Skip to content

Commit b88a15f

Browse files
committed
pytorch 1.8.0 / cuda 11.1
1 parent 7f598ef commit b88a15f

File tree

4 files changed

+88
-58
lines changed

4 files changed

+88
-58
lines changed

.travis.yml

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,61 +10,71 @@ env:
1010
- CUDA_HOME=/usr/local/cuda
1111
jobs:
1212
# Python 3.6
13+
- PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cpu
14+
- PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu101
15+
- PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu102
16+
- PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu111
1317
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cpu
1418
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu92
1519
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu101
1620
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu102
1721
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu110
18-
- PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cpu
19-
- PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu92
20-
- PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu101
21-
- PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu102
2222
# Python 3.7
23+
- PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cpu
24+
- PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu101
25+
- PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu102
26+
- PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu111
2327
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cpu
2428
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu92
2529
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu101
2630
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu102
2731
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu110
28-
- PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cpu
29-
- PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu92
30-
- PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu101
31-
- PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu102
3232
# Python 3.8
33+
- PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cpu
34+
- PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu101
35+
- PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu102
36+
- PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu111
3337
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cpu
3438
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu92
3539
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu101
3640
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu102
3741
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu110
38-
- PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cpu
39-
- PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu92
40-
- PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu101
41-
- PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu102
4242

4343
jobs:
44-
# For daily builds, we only test on Python 3.6 with CUDA 10.2/11.0.
44+
# For daily builds, we only test on Python 3.6 with 11.0/11.1.
4545
# For deployment, we exclude *all* macOS CUDA and Windows CUDA 9.2 jobs.
4646
exclude:
47-
# Python 3.6
47+
# Python 3.6 / PyTorch 1.8.0
48+
- if: not (tag is present or commit_message =~ ci-deploy) and os != osx
49+
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cpu
50+
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
51+
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu101
52+
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
53+
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu102
54+
- if: os = osx
55+
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.8.0 IDX=cu111
56+
# Python 3.6 / PyTorch 1.7.0
4857
- if: not (tag is present or commit_message =~ ci-deploy) and os != osx
4958
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cpu
5059
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
5160
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu92
5261
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
5362
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu101
54-
- if: os = osx
63+
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
5564
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu102
5665
- if: os = osx
5766
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu110
58-
- if: not (tag is present or commit_message =~ ci-deploy) and os != osx
59-
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cpu
60-
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
61-
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu92
67+
# Python 3.7 / PyTorch 1.8.0
68+
- if: not (tag is present or commit_message =~ ci-deploy)
69+
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cpu
6270
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
63-
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu101
64-
- if: os = osx
65-
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu102
66-
# Python 3.7
71+
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu101
72+
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
73+
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu102
74+
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
75+
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.8.0 IDX=cu111
6776
- if: not (tag is present or commit_message =~ ci-deploy)
77+
# Python 3.7 / PyTorch 1.7.0
6878
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cpu
6979
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
7080
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu92
@@ -74,16 +84,17 @@ jobs:
7484
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu102
7585
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
7686
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu110
87+
# Python 3.8 / PyTorch 1.8.0
7788
- if: not (tag is present or commit_message =~ ci-deploy)
78-
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cpu
79-
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
80-
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu92
89+
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cpu
8190
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
82-
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu101
91+
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu101
8392
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
84-
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu102
85-
# Python 3.8
93+
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu102
94+
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
95+
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.8.0 IDX=cu111
8696
- if: not (tag is present or commit_message =~ ci-deploy)
97+
# Python 3.8 / PyTorch 1.7.0
8798
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cpu
8899
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
89100
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu92
@@ -93,22 +104,14 @@ jobs:
93104
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu102
94105
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
95106
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu110
96-
- if: not (tag is present or commit_message =~ ci-deploy)
97-
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cpu
98-
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
99-
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu92
100-
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
101-
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu101
102-
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
103-
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu102
104107

105108
install:
106109
- source script/gcc.sh
107110
- source script/cuda.sh
108111
- source script/conda.sh
109112
- conda create --yes -n test python="${PYTHON_VERSION}"
110113
- source activate test
111-
- conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch --yes
114+
- conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch -c conda-forge --yes
112115
- source script/torch.sh
113116
- pip install flake8
114117
- pip install codecov

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@ All included operations are broadcastable, work on varying data types, are imple
4242

4343
We provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](https://pytorch-geometric.com/whl).
4444

45+
#### PyTorch 1.8.0
46+
47+
To install the binaries for PyTorch 1.8.0, simply run
48+
49+
```
50+
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+${CUDA}.html
51+
```
52+
53+
where `${CUDA}` should be replaced by either `cpu`, `cu101`, `cu102`, or `cu111` depending on your PyTorch installation.
54+
55+
| | `cpu` | `cu101` | `cu102` | `cu111` |
56+
|-------------|-------|---------|---------|---------|
57+
| **Linux** |||||
58+
| **Windows** |||||
59+
| **macOS** || | | |
60+
4561
#### PyTorch 1.7.0
4662

4763
To install the binaries for PyTorch 1.7.0, simply run
@@ -58,23 +74,7 @@ where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu101`, `cu102`, or
5874
| **Windows** ||||||
5975
| **macOS** || | | | |
6076

61-
#### PyTorch 1.6.0
62-
63-
To install the binaries for PyTorch 1.6.0, simply run
64-
65-
```
66-
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.6.0+${CUDA}.html
67-
```
68-
69-
where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu101` or `cu102` depending on your PyTorch installation.
70-
71-
| | `cpu` | `cu92` | `cu101` | `cu102` |
72-
|-------------|-------|--------|---------|---------|
73-
| **Linux** |||||
74-
| **Windows** |||||
75-
| **macOS** || | | |
76-
77-
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0 and PyTorch 1.5.0 (following the same procedure).
77+
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0 and PyTorch 1.6.0 (following the same procedure).
7878

7979
### From source
8080

script/cuda.sh

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "$IDX" = "cu110" ]; then
3232
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
3333
fi
3434

35+
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "$IDX" = "cu111" ]; then
36+
export CUDA_SHORT=11.1
37+
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
38+
fi
39+
3540
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "$IDX" = "cpu" ]; then
3641
export TOOLKIT=cpuonly
3742
fi
@@ -64,6 +69,13 @@ if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "$IDX" = "cu110" ]; then
6469
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
6570
fi
6671

72+
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "$IDX" = "cu111" ]; then
73+
export CUDA_SHORT=11.1
74+
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.1/local_installers
75+
export CUDA_FILE=cuda_${CUDA_SHORT}.1_456.81_win10.exe
76+
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
77+
fi
78+
6779
if [ "${TRAVIS_OS_NAME}" = "osx" ] && [ "$IDX" = "cpu" ]; then
6880
export TOOLKIT=""
6981
fi
@@ -74,7 +86,7 @@ else
7486
export FORCE_CUDA=1
7587
fi
7688

77-
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${IDX}" != "cpu" ] && [ "${IDX}" != "cu110" ]; then
89+
if [ "${TRAVIS_OS_NAME}" = "linux" ] && { [ "${IDX}" = "cu92" ] || [ "${IDX}" = "cu101" ] || [ "${IDX}" = "cu102" ]; }; then
7890
INSTALLER="cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb"
7991
wget -nv "http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}"
8092
sudo dpkg -i "${INSTALLER}"
@@ -88,7 +100,7 @@ if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${IDX}" != "cpu" ] && [ "${IDX}" != "
88100
PATH=${CUDA_HOME}/bin:${PATH}
89101
nvcc --version
90102

91-
# Fix cublas on CUDA 10.1:
103+
# Fix cublas on CUDA 10.2:
92104
if [ -d "/usr/local/cuda-10.2/targets/x86_64-linux/include" ]; then
93105
sudo cp -r /usr/local/cuda-10.2/targets/x86_64-linux/include/* "${CUDA_HOME}/include/"
94106
fi
@@ -112,6 +124,21 @@ if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${IDX}" = "cu110" ]; then
112124
nvcc --version
113125
fi
114126

127+
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${IDX}" = "cu111" ]; then
128+
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
129+
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
130+
wget -nv https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda-repo-ubuntu1804-11-1-local_11.1.1-455.32.00-1_amd64.deb
131+
sudo dpkg -i cuda-repo-ubuntu1804-11-1-local_11.1.1-455.32.00-1_amd64.deb
132+
sudo apt-key add /var/cuda-repo-ubuntu1804-11-1-local/7fa2af80.pub
133+
sudo apt update -qq
134+
sudo apt install cuda-nvcc-11-1 cuda-libraries-dev-11-1
135+
sudo apt clean
136+
CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
137+
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
138+
PATH=${CUDA_HOME}/bin:${PATH}
139+
nvcc --version
140+
fi
141+
115142
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" != "cpu" ]; then
116143
# Install NVIDIA drivers, see:
117144
# https://github.com/pytorch/vision/blob/master/packaging/windows/internal/cuda_install.bat#L99-L102

script/torch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# https://github.com/pytorch/pytorch/commit/d2e16dd888a9b5fd55bd475d4fcffb70f388d4f0
4-
if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
4+
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${TORCH_VERSION}" = "1.7.0" ]; then
55
echo "Fix nvcc for PyTorch"
66
sed -i.bak -e 's/CONSTEXPR_EXCEPT_WIN_CUDA/const/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/api/module.h
77
sed -i.bak -e 's/return \*(this->value)/return \*((type\*)this->value)/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/pybind11/cast.h

0 commit comments

Comments
 (0)