diff --git a/README.md b/README.md index c6119cd..b39b95d 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,19 @@ Import-VisualStudioVars -Architecture x64 $env:LIB += ";C:\Program Files\Python37\libs" ``` +### Apple Silicon (M1/M2 Chips) ### + +We need PyTorch >= 1.13 to run TorchDrug on Apple silicon. For `torch-scatter` and +`torch-cluster`, they can be compiled from their sources. Note TorchDrug doesn't +support `mps` devices. + +```bash +pip install torch==1.13.0 +pip install git+https://github.com/rusty1s/pytorch_scatter.git +pip install git+https://github.com/rusty1s/pytorch_cluster.git +pip install torchdrug +``` + Quick Start ----------- diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 7101cf8..2476540 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -84,4 +84,18 @@ change the library path based on our own Python path. The above commands should be executed for every PowerShell session. To setup this for all PowerShell sessions, we can write them to the PowerShell profile. The profile can be found by the ``$profile`` command in PowerShell. You may need to -create the profile if you use it for the first time. \ No newline at end of file +create the profile if you use it for the first time. + +Apple Silicon (M1/M2 Chips) +--------------------------- + +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. + +.. code:: bash + + pip install torch==1.13.0 + pip install git+https://github.com/rusty1s/pytorch_scatter.git + pip install git+https://github.com/rusty1s/pytorch_cluster.git + pip install torchdrug + +Note TorchDrug runs on Apple silicon CPUs, but doesn't support `mps` devices. \ No newline at end of file