Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------

Expand Down
16 changes: 15 additions & 1 deletion doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.