Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion .github/workflows/torchao_experimental_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- 'gh/**'

jobs:
test:
test-cpu-ops:
strategy:
matrix:
runner: [macos-14]
Expand Down Expand Up @@ -56,3 +56,54 @@ jobs:
sh build_and_run_tests.sh
rm -rf /tmp/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: |
pip install torch --index-url "https://download.pytorch.org/whl/nightly/cpu"
- name: Print torch version
run: |
python -c "import torch; print(torch.__version__)"
- name: Install requirements
run: |
pip install cmake
pip install parameterized
pip install pyyaml
- name: Print pip freeze
run: |
pip freeze
- name: Print current directory
run: |
python -c "import os; print(os.getcwd())"
- name: Build ao with experimental mps ops
run: |
USE_CPP=1 TORCHAO_BUILD_EXPERIMENTAL_MPS=1 pip install .
- name: Run mps tests
run: |
pushd torchao/experimental/ops/mps/test
python test_lowbit.py
python test_quantizer.py
popd
Loading