Skip to content

Commit 5ec31fc

Browse files
authored
PyTorch 1.12 support (#308)
* PyTorch 1.12 support * update
1 parent 847995d commit 5ec31fc

File tree

11 files changed

+90
-39
lines changed

11 files changed

+90
-39
lines changed

.github/workflows/building-conda.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,25 @@ jobs:
1212
matrix:
1313
os: [ubuntu-18.04, macos-10.15, windows-2019]
1414
python-version: ['3.7', '3.8', '3.9', '3.10']
15-
torch-version: [1.10.0, 1.11.0]
16-
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115']
15+
torch-version: [1.11.0, 1.12.0]
16+
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115', 'cu116']
1717
exclude:
18-
- torch-version: 1.10.0
18+
- torch-version: 1.11.0
19+
cuda-version: 'cu116'
20+
- torch-version: 1.12.0
1921
cuda-version: 'cu115'
20-
- torch-version: 1.10.0
21-
python-version: '3.10'
22-
- os: windows-2019
23-
torch-version: 1.11.0
24-
cuda-version: 'cu102'
2522
- os: macos-10.15
2623
cuda-version: 'cu102'
2724
- os: macos-10.15
2825
cuda-version: 'cu113'
2926
- os: macos-10.15
3027
cuda-version: 'cu115'
31-
# There is a weird `glibc=2.27` bug going on for this combination:
32-
- os: ubuntu-18.04
33-
python-version: '3.10'
34-
- os: ubuntu-18.04
35-
cuda-version: 'cu115'
28+
- os: macos-10.15
29+
cuda-version: 'cu116'
30+
- os: windows-2019
31+
cuda-version: 'cu102'
32+
- os: windows-2019 # Complains about CUDA mismatch.
33+
python-version: '3.7'
3634

3735
steps:
3836
- uses: actions/checkout@v2

.github/workflows/building.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,25 @@ jobs:
1212
matrix:
1313
os: [ubuntu-18.04, macos-10.15, windows-2019]
1414
python-version: ['3.7', '3.8', '3.9', '3.10']
15-
torch-version: [1.10.0, 1.11.0]
16-
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115']
15+
torch-version: [1.11.0, 1.12.0]
16+
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115', 'cu116']
1717
exclude:
18-
- torch-version: 1.10.0
18+
- torch-version: 1.11.0
19+
cuda-version: 'cu116'
20+
- torch-version: 1.12.0
1921
cuda-version: 'cu115'
20-
- torch-version: 1.10.0
21-
python-version: '3.10'
22-
- os: windows-2019
23-
torch-version: 1.11.0
24-
cuda-version: 'cu102'
2522
- os: macos-10.15
2623
cuda-version: 'cu102'
2724
- os: macos-10.15
2825
cuda-version: 'cu113'
2926
- os: macos-10.15
3027
cuda-version: 'cu115'
31-
# There is a weird bug going on for this combination:
28+
- os: macos-10.15
29+
cuda-version: 'cu116'
3230
- os: windows-2019
31+
cuda-version: 'cu102'
32+
- os: windows-2019 # Complains about CUDA mismatch.
3333
python-version: '3.7'
34-
cuda-version: 'cu115'
3534

3635
steps:
3736
- uses: actions/checkout@v2
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/usr/local/cuda-11.6
4+
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
5+
PATH=${CUDA_HOME}/bin:${PATH}
6+
7+
export FORCE_CUDA=1
8+
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
OS=ubuntu1804
4+
5+
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin
6+
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600
7+
wget -nv https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda-repo-${OS}-11-6-local_11.6.2-510.47.03-1_amd64.deb
8+
sudo dpkg -i cuda-repo-${OS}-11-6-local_11.6.2-510.47.03-1_amd64.deb
9+
sudo apt-key add /var/cuda-repo-${OS}-11-6-local/7fa2af80.pub
10+
11+
sudo apt-get -qq update
12+
sudo apt install cuda-nvcc-11-6 cuda-libraries-dev-11-6
13+
sudo apt clean
14+
15+
rm -f https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda-repo-${OS}-11-6-local_11.6.2-510.47.03-1_amd64.deb
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.3
4+
PATH=${CUDA_HOME}/bin:$PATH
5+
PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH
6+
7+
export FORCE_CUDA=1
8+
export TORCH_CUDA_ARCH_LIST="6.0+PTX"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# TODO We currently use CUDA 11.3 to build CUDA 11.5 Windows wheels
4+
5+
# Install NVIDIA drivers, see:
6+
# https://github.com/pytorch/vision/blob/master/packaging/windows/internal/cuda_install.bat#L99-L102
7+
curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "/tmp/gpu_driver_dlls.zip"
8+
7z x "/tmp/gpu_driver_dlls.zip" -o"/c/Windows/System32"
9+
10+
export CUDA_SHORT=11.3
11+
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.0/local_installers
12+
export CUDA_FILE=cuda_${CUDA_SHORT}.0_465.89_win10.exe
13+
14+
# Install CUDA:
15+
curl -k -L "${CUDA_URL}/${CUDA_FILE}" --output "${CUDA_FILE}"
16+
echo ""
17+
echo "Installing from ${CUDA_FILE}..."
18+
PowerShell -Command "Start-Process -FilePath \"${CUDA_FILE}\" -ArgumentList \"-s nvcc_${CUDA_SHORT} cuobjdump_${CUDA_SHORT} nvprune_${CUDA_SHORT} cupti_${CUDA_SHORT} cublas_dev_${CUDA_SHORT} cudart_${CUDA_SHORT} cufft_dev_${CUDA_SHORT} curand_dev_${CUDA_SHORT} cusolver_dev_${CUDA_SHORT} cusparse_dev_${CUDA_SHORT} thrust_${CUDA_SHORT} npp_dev_${CUDA_SHORT} nvrtc_dev_${CUDA_SHORT} nvml_dev_${CUDA_SHORT}\" -Wait -NoNewWindow"
19+
echo "Done!"
20+
rm -f "${CUDA_FILE}"

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
strategy:
3434
matrix:
35-
torch-version: [1.11.0]
35+
torch-version: [1.12.0]
3636

3737
steps:
3838
- uses: actions/checkout@v2

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os: [ubuntu-latest, windows-latest]
1818
python-version: [3.7]
19-
torch-version: [1.10.0, 1.11.0]
19+
torch-version: [1.11.0, 1.12.0]
2020

2121
steps:
2222
- uses: actions/checkout@v2

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,39 +54,39 @@ conda install pytorch-scatter -c pyg
5454

5555
We alternatively provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl).
5656

57-
#### PyTorch 1.11
57+
#### PyTorch 1.12
5858

59-
To install the binaries for PyTorch 1.11.0, simply run
59+
To install the binaries for PyTorch 1.12.0, simply run
6060

6161
```
62-
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.11.0+${CUDA}.html
62+
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.12.0+${CUDA}.html
6363
```
6464

65-
where `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu113`, or `cu115` depending on your PyTorch installation.
65+
where `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu113`, or `cu116` depending on your PyTorch installation.
6666

67-
| | `cpu` | `cu102` | `cu113` | `cu115` |
67+
| | `cpu` | `cu102` | `cu113` | `cu116` |
6868
|-------------|-------|---------|---------|---------|
6969
| **Linux** |||||
7070
| **Windows** || |||
7171
| **macOS** || | | |
7272

73-
#### PyTorch 1.10
73+
#### PyTorch 1.11
7474

75-
To install the binaries for PyTorch 1.10.0, PyTorch 1.10.1 and PyTorch 1.10.2, simply run
75+
To install the binaries for PyTorch 1.11.0, simply run
7676

7777
```
78-
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.10.0+${CUDA}.html
78+
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.11.0+${CUDA}.html
7979
```
8080

81-
where `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu111`, or `cu113` depending on your PyTorch installation.
81+
where `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu113`, or `cu115` depending on your PyTorch installation.
8282

83-
| | `cpu` | `cu102` | `cu111` | `cu113` |
83+
| | `cpu` | `cu102` | `cu113` | `cu115` |
8484
|-------------|-------|---------|---------|---------|
8585
| **Linux** |||||
86-
| **Windows** || |||
86+
| **Windows** || |||
8787
| **macOS** || | | |
8888

89-
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0, PyTorch 1.6.0, PyTorch 1.7.0/1.7.1, PyTorch 1.8.0/1.8.1 and PyTorch 1.9.0 (following the same procedure).
89+
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0, PyTorch 1.6.0, PyTorch 1.7.0/1.7.1, PyTorch 1.8.0/1.8.1, PyTorch 1.9.0, and PyTorch 1.10.0/1.10.1/1.10.2 (following the same procedure).
9090
For older versions, you might need to explicitly specify the latest supported version number in order to prevent a manual installation from source.
9191
You can look up the latest supported version number [here](https://data.pyg.org/whl).
9292

conda/pytorch-scatter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
```
2-
./build_conda.sh 3.9 1.11.0 cu113 # python, pytorch and cuda version
2+
./build_conda.sh 3.9 1.12.0 cu113 # python, pytorch and cuda version
33
```

0 commit comments

Comments
 (0)