Skip to content

Commit f04ff57

Browse files
authored
Add CI for Arm Linux (#2211)
* Update torchao_experimental_test.yml Add CI for arm linux * Update torchao_experimental_test.yml * Update torchao_experimental_test.yml
1 parent 554cb60 commit f04ff57

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/torchao_experimental_test.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
test-cpu-ops:
1515
strategy:
1616
matrix:
17-
runner: [macos-14]
17+
runner: [macos-14, linux.arm64.2xlarge]
1818
runs-on: ${{matrix.runner}}
1919
defaults:
2020
run:
@@ -30,7 +30,8 @@ jobs:
3030
python-version: "3.10"
3131
miniconda-version: "latest"
3232
activate-environment: venv
33-
- name: Install requirements
33+
- name: Install requirements mac
34+
if: runner.os == 'macOS'
3435
run: |
3536
conda activate venv
3637
# Install executorch first because it installs its own version
@@ -39,27 +40,37 @@ jobs:
3940
pip install torch==2.7.0 --index-url https://download.pytorch.org/whl/cpu --force-reinstall
4041
pip install -r dev-requirements.txt
4142
USE_CPP=1 TORCHAO_BUILD_KLEIDIAI=1 pip install .
43+
- name: Install requirements linux
44+
if: runner.os == 'Linux'
45+
run: |
46+
conda activate venv
47+
pip install torch==2.7.0 --index-url https://download.pytorch.org/whl/cpu --force-reinstall
48+
pip install -r dev-requirements.txt
49+
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 .
4250
- name: Run python tests
4351
run: |
4452
conda activate venv
4553
pytest torchao/experimental/tests/test_int8_dynamic_activation_intx_weight.py
4654
python torchao/experimental/tests/test_embedding_xbit_quantizer.py
4755
python torchao/experimental/tests/test_quant_passes.py
4856
- name: Run kernels/cpu/aarch64/tests
57+
if: runner.os == 'macOS'
4958
run: |
5059
conda activate venv
5160
pushd torchao/experimental/kernels/cpu/aarch64/tests
5261
sh build_and_run_tests.sh
5362
rm -rf /tmp/cmake-out
5463
popd
5564
- name: Run torchao/experimental/ops/tests
65+
if: runner.os == 'macOS'
5666
run: |
5767
conda activate venv
5868
pushd torchao/experimental/ops/tests
5969
sh build_and_run_tests.sh
6070
rm -rf /tmp/cmake-out
6171
popd
6272
- name: ET ops build
73+
if: runner.os == 'macOS'
6374
run: |
6475
conda activate venv
6576
pushd torchao/experimental

0 commit comments

Comments
 (0)