Skip to content

Commit 72e3c11

Browse files
authored
[BE] Fix MPS experimental workflow (#2181)
* [BE] Fix MPS tests By actually running them in the conda env that is being created * Update torchao_experimental_test.yml * Update torchao_experimental_test.yml
1 parent c9b9adc commit 72e3c11

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/torchao_experimental_test.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -92,26 +92,31 @@ jobs:
9292
conda activate test-mps-ops-env
9393
- name: Install torch
9494
run: |
95-
pip install torch --index-url "https://download.pytorch.org/whl/nightly/cpu"
95+
conda run -n test-mps-ops-env pip install torch --index-url "https://download.pytorch.org/whl/nightly/cpu"
9696
- name: Print torch version
9797
run: |
98-
python -c "import torch; print(torch.__version__)"
98+
99+
conda run -n test-mps-ops-env python -c "import torch; print(torch.__version__)"
99100
- name: Install requirements
100101
run: |
102+
source activate base
103+
conda activate test-mps-ops-env
101104
pip install -r dev-requirements.txt
102105
pip install pyyaml importlib-metadata
103106
- name: Print pip freeze
104107
run: |
105-
pip freeze
108+
conda run -n test-mps-ops-env pip freeze
106109
- name: Print current directory
107110
run: |
108-
python -c "import os; print(os.getcwd())"
111+
conda run -n test-mps-ops-env python -c "import os; print(os.getcwd())"
109112
- name: Build ao with experimental mps ops
110113
run: |
114+
source activate base
115+
conda activate test-mps-ops-env
111116
USE_CPP=1 TORCHAO_BUILD_EXPERIMENTAL_MPS=1 pip install .
112117
- name: Run mps tests
113118
run: |
114119
pushd torchao/experimental/ops/mps/test
115-
python test_lowbit.py
116-
python test_quantizer.py
120+
conda run -n test-mps-ops-env python test_lowbit.py
121+
conda run -n test-mps-ops-env python test_quantizer.py
117122
popd

0 commit comments

Comments
 (0)