diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 23e7eba..195717a 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -27,7 +27,3 @@ jobs: ./hello clang++ -o query_metal query_metal.mm -framework Metal -framework Foundation -lobjc -std=c++17 ./query_metal - - name: Install PyTorch and run matmul on MPS - run: | - pip install torch --pre --index-url https://download.pytorch.org/whl/nightly/cpu - python -c "import torch;print(torch.rand(3, 3, device='mps'))" diff --git a/.github/workflows/install_torch.yml b/.github/workflows/install_torch.yml new file mode 100644 index 0000000..9928c65 --- /dev/null +++ b/.github/workflows/install_torch.yml @@ -0,0 +1,22 @@ +name: Install torch on macos-latest + +on: + push: + branches: + - hauptzweig + paths: + - .github/workflows/install_torch.yml + workflow_dispatch: + +jobs: + install_torch: + runs-on: macos-15 + steps: + - name: Install Python-3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: Install PyTorch and run matmul on MPS + run: | + pip install torch + python -c "import torch;print(torch.__version__, torch.rand(3, 3))"