Skip to content

Commit

Permalink
Add install_torch workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
malfet committed Oct 30, 2024
1 parent 15a814e commit 0d1e8f5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'))"
22 changes: 22 additions & 0 deletions .github/workflows/install_torch.yml
Original file line number Diff line number Diff line change
@@ -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))"

0 comments on commit 0d1e8f5

Please sign in to comment.