Skip to content

Commit e3e659d

Browse files
migalkinKiddoZhu
andauthored
Apple Silicon installation instructions (#176)
Apple Silicon installation instructions --------- Co-authored-by: Zhaocheng Zhu <[email protected]>
1 parent 323ed65 commit e3e659d

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ Import-VisualStudioVars -Architecture x64
7878
$env:LIB += ";C:\Program Files\Python37\libs"
7979
```
8080

81+
### Apple Silicon (M1/M2 Chips) ###
82+
83+
We need PyTorch >= 1.13 to run TorchDrug on Apple silicon. For `torch-scatter` and
84+
`torch-cluster`, they can be compiled from their sources. Note TorchDrug doesn't
85+
support `mps` devices.
86+
87+
```bash
88+
pip install torch==1.13.0
89+
pip install git+https://github.com/rusty1s/pytorch_scatter.git
90+
pip install git+https://github.com/rusty1s/pytorch_cluster.git
91+
pip install torchdrug
92+
```
93+
8194
Quick Start
8295
-----------
8396

doc/source/installation.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,18 @@ change the library path based on our own Python path.
8484
The above commands should be executed for every PowerShell session. To setup this
8585
for all PowerShell sessions, we can write them to the PowerShell profile. The
8686
profile can be found by the ``$profile`` command in PowerShell. You may need to
87-
create the profile if you use it for the first time.
87+
create the profile if you use it for the first time.
88+
89+
Apple Silicon (M1/M2 Chips)
90+
---------------------------
91+
92+
PyTorch supports Apple silicon from version 1.13. While `torch-scatter` and `torch-cluster` don't have pre-compiled binaries for Apple silicon, we can compile them from their sources. See https://github.com/rusty1s/pytorch_scatter/issues/241 for more details.
93+
94+
.. code:: bash
95+
96+
pip install torch==1.13.0
97+
pip install git+https://github.com/rusty1s/pytorch_scatter.git
98+
pip install git+https://github.com/rusty1s/pytorch_cluster.git
99+
pip install torchdrug
100+
101+
Note TorchDrug runs on Apple silicon CPUs, but doesn't support `mps` devices.

0 commit comments

Comments
 (0)