-
Notifications
You must be signed in to change notification settings - Fork 459
138 lines (134 loc) · 4.74 KB
/
regression_test_aarch64.yml
File metadata and controls
138 lines (134 loc) · 4.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Run Regression Tests (aarch64)
on:
push:
branches:
- main
- 'gh/**'
pull_request:
branches:
- main
- 'gh/**'
jobs:
test-cpu-ops:
strategy:
matrix:
runner: [macos-14, linux.arm64.2xlarge]
runs-on: ${{matrix.runner}}
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: true
- name: Setup environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.10"
miniconda-version: "latest"
activate-environment: venv
- name: Install requirements mac
if: runner.os == 'macOS'
run: |
conda activate venv
# Install executorch first because it installs its own version
# of torch and torchao, which we do not want to use
pip install executorch
pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cpu --force-reinstall
pip install -r dev-requirements.txt
USE_CPP=1 TORCHAO_BUILD_KLEIDIAI=1 pip install . --no-build-isolation
- name: Install requirements linux
if: runner.os == 'Linux'
run: |
conda activate venv
pip install coremltools
pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cpu --force-reinstall
pip install -r dev-requirements.txt
BUILD_TORCHAO_EXPERIMENTAL=1 TORCHAO_BUILD_CPU_AARCH64=1 TORCHAO_BUILD_KLEIDIAI=1 TORCHAO_ENABLE_ARM_NEON_DOT=1 TORCHAO_PARALLEL_BACKEND=OPENMP pip install . --no-build-isolation
- name: Run python tests
run: |
conda activate venv
pytest -s test/quantization/quantize_/workflows/intx/test_intx_opaque_tensor.py
pytest -s test/prototype/test_embedding.py
pytest -s test/prototype/test_int8_lut_tensor.py
pytest -s test/prototype/test_tensor_conversion.py
pytest -s test/prototype/test_groupwise_lowbit_weight_lut_quantizer.py
pytest -s test/prototype/test_parq.py
- name: torchao/csrc/cpu - build and run C++ tests
if: runner.os == 'macOS'
run: |
conda activate venv
pushd torchao/csrc/cpu
sh build_and_run_tests.sh
rm -rf cmake-out
popd
- name: torchao/csrc/cpu - build benchmarks
if: runner.os == 'macOS'
run: |
conda activate venv
pushd torchao/csrc/cpu
sh build_and_run_benchmarks.sh build_only
rm -rf cmake-out
popd
- name: torchao/csrc/cpu - build shared_kernels with ExecuTorch
if: runner.os == 'macOS'
run: |
conda activate venv
pushd torchao/csrc/cpu
sh build_shared_kernels.sh executorch
rm -rf cmake-out
popd
# test-mps-ops:
# strategy:
# matrix:
# runner: [macos-m1-stable]
# runs-on: ${{matrix.runner}}
# steps:
# - name: Print machine info
# run: |
# uname -a
# if [ $(uname -s) == Darwin ]; then
# sysctl machdep.cpu.brand_string
# sysctl machdep.cpu.core_count
# fi
# - name: Checkout repo
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Create conda env
# run: |
# conda create -yn test-mps-ops-env python=3.11
# - name: Activate conda env
# run: |
# source activate base
# conda activate test-mps-ops-env
# - name: Install torch
# run: |
# conda run -n test-mps-ops-env pip install torch --index-url "https://download.pytorch.org/whl/nightly/cpu"
# - name: Print torch version
# run: |
# conda run -n test-mps-ops-env python -c "import torch; print(torch.__version__)"
# - name: Install requirements
# run: |
# source activate base
# conda activate test-mps-ops-env
# pip install -r dev-requirements.txt
# pip install pyyaml importlib-metadata
# - name: Print pip freeze
# run: |
# conda run -n test-mps-ops-env pip freeze
# - name: Print current directory
# run: |
# conda run -n test-mps-ops-env python -c "import os; print(os.getcwd())"
# - name: Build ao with experimental mps ops
# run: |
# source activate base
# conda activate test-mps-ops-env
# USE_CPP=1 TORCHAO_BUILD_EXPERIMENTAL_MPS=1 pip install .
# - name: Run mps tests
# run: |
# pushd torchao/experimental/ops/mps/test
# conda run -n test-mps-ops-env python test_lowbit.py
# conda run -n test-mps-ops-env python test_quantizer.py
# popd