File tree 1 file changed +52
-1
lines changed 1 file changed +52
-1
lines changed Original file line number Diff line number Diff line change 11
11
- ' gh/**'
12
12
13
13
jobs :
14
- test :
14
+ test-cpu-ops :
15
15
strategy :
16
16
matrix :
17
17
runner : [macos-14]
56
56
sh build_and_run_tests.sh
57
57
rm -rf /tmp/cmake-out
58
58
popd
59
+
60
+ test-mps-ops :
61
+ strategy :
62
+ matrix :
63
+ runner : [macos-m1-stable]
64
+ runs-on : ${{matrix.runner}}
65
+ steps :
66
+ - name : Print machine info
67
+ run : |
68
+ uname -a
69
+ if [ $(uname -s) == Darwin ]; then
70
+ sysctl machdep.cpu.brand_string
71
+ sysctl machdep.cpu.core_count
72
+ fi
73
+ - name : Checkout repo
74
+ uses : actions/checkout@v3
75
+ with :
76
+ submodules : true
77
+ - name : Create conda env
78
+ run : |
79
+ conda create -yn test-mps-ops-env python=3.11
80
+ - name : Activate conda env
81
+ run : |
82
+ source activate base
83
+ conda activate test-mps-ops-env
84
+ - name : Install torch
85
+ run : |
86
+ pip install torch --index-url "https://download.pytorch.org/whl/nightly/cpu"
87
+ - name : Print torch version
88
+ run : |
89
+ python -c "import torch; print(torch.__version__)"
90
+ - name : Install requirements
91
+ run : |
92
+ pip install cmake
93
+ pip install parameterized
94
+ pip install pyyaml
95
+ - name : Print pip freeze
96
+ run : |
97
+ pip freeze
98
+ - name : Print current directory
99
+ run : |
100
+ python -c "import os; print(os.getcwd())"
101
+ - name : Build ao with experimental mps ops
102
+ run : |
103
+ USE_CPP=1 TORCHAO_BUILD_EXPERIMENTAL_MPS=1 pip install .
104
+ - name : Run mps tests
105
+ run : |
106
+ pushd torchao/experimental/ops/mps/test
107
+ python test_lowbit.py
108
+ python test_quantizer.py
109
+ popd
You can’t perform that action at this time.
0 commit comments