Skip to content

Commit 3c34189

Browse files
committed
Apple Silicon Support for TorchRL
1 parent 7ae6140 commit 3c34189

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/wheels.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,38 @@ jobs:
8484
name: torchrl-batch.whl
8585
path: dist/*.whl
8686

87+
build-wheel-m1:
88+
runs-on: macos-m1-12
89+
strategy:
90+
matrix:
91+
python_version: [["3.7", "3.7"], ["3.8", "3.8"], ["3.9", "3.9"], ["3.10", "3.10.3"]]
92+
steps:
93+
- name: Setup Python
94+
uses: actions/setup-python@v2
95+
with:
96+
python-version: ${{ matrix.python_version[1] }}
97+
architecture: x64
98+
- name: Checkout torchrl
99+
uses: actions/checkout@v2
100+
- name: Install PyTorch RC
101+
run: |
102+
python3 -mpip install torch --extra-index-url https://download.pytorch.org/whl/cpu
103+
- name: Build wheel
104+
run: |
105+
export CC=clang CXX=clang++
106+
python3 -mpip install wheel
107+
BUILD_VERSION=0.1.1 python3 setup.py bdist_wheel
108+
- name: Upload wheel for the test-wheel job
109+
uses: actions/upload-artifact@v2
110+
with:
111+
name: torchrl-mac-${{ matrix.python_version[0] }}.whl
112+
path: dist/torchrl-*.whl
113+
- name: Upload wheel for download
114+
uses: actions/upload-artifact@v2
115+
with:
116+
name: torchrl-batch.whl
117+
path: dist/*.whl
118+
87119
build-wheel-windows:
88120
runs-on: windows-latest
89121
strategy:

0 commit comments

Comments
 (0)