Skip to content

Commit bf36f19

Browse files
committed
build for pytorch 1.7.0 ci-deploy
1 parent 134b5c7 commit bf36f19

File tree

6 files changed

+111
-87
lines changed

6 files changed

+111
-87
lines changed

.travis.yml

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,51 @@ env:
1010
- CUDA_HOME=/usr/local/cuda
1111
jobs:
1212
# Python 3.6
13+
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cpu
14+
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu92
15+
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu101
16+
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu102
17+
- PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu110
1318
- PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cpu
1419
- PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu92
1520
- PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu101
1621
- PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu102
17-
- PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cpu
18-
- PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu92
19-
- PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu101
20-
- PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu102
2122
# Python 3.7
23+
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cpu
24+
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu92
25+
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu101
26+
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu102
27+
- PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu110
2228
- PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cpu
2329
- PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu92
2430
- PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu101
2531
- PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu102
26-
- PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cpu
27-
- PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu92
28-
- PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu101
29-
- PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu102
3032
# Python 3.8
33+
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cpu
34+
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu92
35+
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu101
36+
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu102
37+
- PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu110
3138
- PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cpu
3239
- PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu92
3340
- PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu101
3441
- PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu102
35-
- PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cpu
36-
- PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu92
37-
- PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu101
38-
- PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu102
3942

4043
jobs:
41-
# For daily builds, we only test on *Python 3.6* and *CUDA 10.2*.
44+
# For daily builds, we only test on Python 3.6 with CUDA 10.2/11.0.
4245
# For deployment, we exclude *all* macOS CUDA and Windows CUDA 9.2 jobs.
4346
exclude:
4447
# Python 3.6
48+
- if: not (tag is present or commit_message =~ ci-deploy) and os != osx
49+
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cpu
50+
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
51+
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu92
52+
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
53+
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu101
54+
- if: os = osx
55+
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu102
56+
- if: os = osx
57+
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu110
4558
- if: not (tag is present or commit_message =~ ci-deploy) and os != osx
4659
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cpu
4760
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
@@ -50,15 +63,17 @@ jobs:
5063
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu101
5164
- if: os = osx
5265
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu102
53-
- if: not (tag is present or commit_message =~ ci-deploy) and os != osx
54-
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cpu
66+
# Python 3.7
67+
- if: not (tag is present or commit_message =~ ci-deploy)
68+
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cpu
5569
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
56-
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu92
70+
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu92
5771
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
58-
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu101
59-
- if: os = osx
60-
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu102
61-
# Python 3.7
72+
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu101
73+
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
74+
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu102
75+
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
76+
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu110
6277
- if: not (tag is present or commit_message =~ ci-deploy)
6378
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cpu
6479
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
@@ -67,15 +82,17 @@ jobs:
6782
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu101
6883
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
6984
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu102
85+
# Python 3.8
7086
- if: not (tag is present or commit_message =~ ci-deploy)
71-
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cpu
87+
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cpu
7288
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
73-
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu92
89+
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu92
7490
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
75-
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu101
91+
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu101
7692
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
77-
env: PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu102
78-
# Python 3.8
93+
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.7.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.7.0 IDX=cu110
7996
- if: not (tag is present or commit_message =~ ci-deploy)
8097
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cpu
8198
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
@@ -84,14 +101,6 @@ jobs:
84101
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu101
85102
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
86103
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu102
87-
- if: not (tag is present or commit_message =~ ci-deploy)
88-
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cpu
89-
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
90-
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu92
91-
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
92-
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu101
93-
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
94-
env: PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu102
95104

96105
install:
97106
- source script/gcc.sh

README.md

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,29 @@ 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.6.0
45+
#### PyTorch 1.7.0
4646

47-
To install the binaries for PyTorch 1.6.0, simply run
47+
To install the binaries for PyTorch 1.7.0, simply run
4848

4949
```
50-
pip install torch-scatter==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.6.0.html
50+
pip install torch-scatter==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.7.0.html
5151
```
5252

53-
where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu101` or `cu102` depending on your PyTorch installation.
53+
where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu101`, `cu102`, or `cu110` depending on your PyTorch installation.
5454

55-
| | `cpu` | `cu92` | `cu101` | `cu102` |
56-
|-------------|-------|--------|---------|---------|
57-
| **Linux** |||||
58-
| **Windows** |||||
59-
| **macOS** || | | |
55+
| | `cpu` | `cu92` | `cu101` | `cu102` | `cu110` |
56+
|-------------|-------|--------|---------|---------|---------|
57+
| **Linux** ||||||
58+
| **Windows** ||||||
59+
| **macOS** || | | | |
6060

61-
#### PyTorch 1.5.0
6261

63-
To install the binaries for PyTorch 1.5.0, simply run
62+
#### PyTorch 1.6.0
63+
64+
To install the binaries for PyTorch 1.6.0, simply run
6465

6566
```
66-
pip install torch-scatter==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.5.0.html
67+
pip install torch-scatter==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.6.0.html
6768
```
6869

6970
where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu101` or `cu102` depending on your PyTorch installation.
@@ -74,21 +75,7 @@ where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu101` or `cu102` d
7475
| **Windows** |||||
7576
| **macOS** || | | |
7677

77-
#### PyTorch 1.4.0
78-
79-
To install the binaries for PyTorch 1.4.0, simply run
80-
81-
```
82-
pip install torch-scatter==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.4.0.html
83-
```
84-
85-
where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu100` or `cu101` depending on your PyTorch installation.
86-
87-
| | `cpu` | `cu92` | `cu100` | `cu101` |
88-
|-------------|-------|--------|---------|---------|
89-
| **Linux** |||||
90-
| **Windows** |||||
91-
| **macOS** || | | |
78+
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0 and PyTorch 1.5.0 (following the same procedure).
9279

9380
### From source
9481

csrc/scatter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ class ScatterMean : public torch::autograd::Function<ScatterMean> {
9595
count = broadcast(count, out, dim);
9696

9797
if (out.is_floating_point())
98-
out.true_divide_(count);
98+
out.true_divide_(count);
9999
else
100-
out.floor_divide_(count);
100+
out.floor_divide_(count);
101101

102102
ctx->save_for_backward({index, count});
103103
if (optional_out.has_value())

script/cuda.sh

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "$IDX" = "cu92" ]; then
88
export CUDA_SHORT=9.2
99
export CUDA=9.2.148-1
1010
export UBUNTU_VERSION=ubuntu1604
11-
export CUBLAS=cuda-cublas-dev-9-2
1211
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
1312
fi
1413

1514
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "$IDX" = "cu101" ]; then
1615
export IDX=cu101
1716
export CUDA_SHORT=10.1
18-
export CUDA=10.1.105-1
17+
export CUDA=10.1.243-1
1918
export UBUNTU_VERSION=ubuntu1804
20-
export CUBLAS=libcublas-dev
2119
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
2220
fi
2321

@@ -26,7 +24,11 @@ if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "$IDX" = "cu102" ]; then
2624
export CUDA_SHORT=10.2
2725
export CUDA=10.2.89-1
2826
export UBUNTU_VERSION=ubuntu1804
29-
export CUBLAS=libcublas-dev
27+
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
28+
fi
29+
30+
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "$IDX" = "cu110" ]; then
31+
export CUDA_SHORT=11.0
3032
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
3133
fi
3234

@@ -55,6 +57,13 @@ if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "$IDX" = "cu102" ]; then
5557
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
5658
fi
5759

60+
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "$IDX" = "cu110" ]; then
61+
export CUDA_SHORT=11.0
62+
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.2/local_installers
63+
export CUDA_FILE=cuda_${CUDA_SHORT}.2_451.48_win10.exe
64+
export TOOLKIT="cudatoolkit=${CUDA_SHORT}"
65+
fi
66+
5867
if [ "${TRAVIS_OS_NAME}" = "osx" ] && [ "$IDX" = "cpu" ]; then
5968
export TOOLKIT=""
6069
fi
@@ -65,14 +74,41 @@ else
6574
export FORCE_CUDA=1
6675
fi
6776

68-
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${IDX}" != "cpu" ]; then
69-
INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
77+
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${IDX}" != "cpu" ] && [ "${IDX}" != "cu110" ]; then
78+
INSTALLER="cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb"
7079
wget -nv "http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}"
7180
sudo dpkg -i "${INSTALLER}"
7281
wget -nv "https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub"
7382
sudo apt-key add 7fa2af80.pub
7483
sudo apt update -qq
75-
sudo apt install -y "cuda-core-${CUDA_SHORT/./-}" "cuda-cudart-dev-${CUDA_SHORT/./-}" "${CUBLAS}" "cuda-cusparse-dev-${CUDA_SHORT/./-}"
84+
sudo apt install "cuda-core-${CUDA_SHORT/./-}" "cuda-nvcc-${CUDA_SHORT/./-}" "cuda-libraries-dev-${CUDA_SHORT/./-}"
85+
sudo apt clean
86+
CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
87+
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
88+
PATH=${CUDA_HOME}/bin:${PATH}
89+
nvcc --version
90+
91+
echo '----------'
92+
sudo find / -name "*cublas*"
93+
echo '----------'
94+
95+
# Fix cublas on CUDA 10.1:
96+
if [ -d "/usr/local/cuda-10.2/targets/x86_64-linux/include" ]; then
97+
sudo cp -r /usr/local/cuda-10.2/targets/x86_64-linux/include/* "${CUDA_HOME}/include/"
98+
fi
99+
if [ -d "/usr/local/cuda-10.2/targets/x86_64-linux/lib" ]; then
100+
sudo cp -r /usr/local/cuda-10.2/targets/x86_64-linux/lib/* "${CUDA_HOME}/lib/"
101+
fi
102+
fi
103+
104+
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${IDX}" = "cu110" ]; then
105+
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
106+
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
107+
wget -nv https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda-repo-ubuntu1804-11-0-local_11.0.3-450.51.06-1_amd64.deb
108+
sudo dpkg -i cuda-repo-ubuntu1804-11-0-local_11.0.3-450.51.06-1_amd64.deb
109+
sudo apt-key add /var/cuda-repo-ubuntu1804-11-0-local/7fa2af80.pub
110+
sudo apt update -qq
111+
sudo apt install cuda-nvcc-11-0 cuda-libraries-dev-11-0
76112
sudo apt clean
77113
CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
78114
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
@@ -86,16 +122,11 @@ if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" != "cpu" ]; then
86122
curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "/tmp/gpu_driver_dlls.zip"
87123
7z x "/tmp/gpu_driver_dlls.zip" -o"/c/Windows/System32"
88124

89-
# Install CUDA
125+
# Install CUDA:
90126
wget -nv "${CUDA_URL}/${CUDA_FILE}"
91-
PowerShell -Command "Start-Process -FilePath \"${CUDA_FILE}\" -ArgumentList \"-s nvcc_${CUDA_SHORT} cublas_dev_${CUDA_SHORT} cusparse_dev_${CUDA_SHORT}\" -Wait -NoNewWindow"
127+
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} npp_dev_${CUDA_SHORT} nvrtc_dev_${CUDA_SHORT} nvml_dev_${CUDA_SHORT}\" -Wait -NoNewWindow"
92128
CUDA_HOME=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v${CUDA_SHORT}
93129
PATH=${CUDA_HOME}/bin:$PATH
94130
PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH
95131
nvcc --version
96132
fi
97-
98-
# Fix Cuda9.2 on Windows: https://github.com/pytorch/pytorch/issues/6109
99-
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" = "cu92" ]; then
100-
sed -i.bak -e '129,141d' "${CUDA_HOME}/include/crt/host_config.h"
101-
fi

script/rename_wheel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import shutil
66

77
idx = sys.argv[1]
8-
assert idx in ['cpu', 'cu92', 'cu101', 'cu102']
8+
assert idx in ['cpu', 'cu92', 'cu101', 'cu102', 'cu110']
99

1010
dist_dir = osp.join(osp.dirname(osp.abspath(__file__)), '..', 'dist')
1111
wheels = glob.glob(osp.join('dist', '**', '*.whl'), recursive=True)

script/torch.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
#!/bin/bash
22

3-
# Fix "member may not be initialized" error on Windows: https://github.com/pytorch/pytorch/issues/27958
4-
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${TORCH_VERSION}" = "1.5.0" ]; then
5-
echo "Fix nvcc for PyTorch 1.5.0"
6-
sed -i.bak -e 's/constexpr/const/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/api/module.h
7-
sed -i.bak -e 's/constexpr/const/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/runtime/argument_spec.h
8-
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
9-
fi
10-
113
# https://github.com/pytorch/pytorch/commit/d2e16dd888a9b5fd55bd475d4fcffb70f388d4f0
12-
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${TORCH_VERSION}" = "1.6.0" ]; then
13-
echo "Fix nvcc for PyTorch 1.6.0"
4+
if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
5+
echo "Fix nvcc for PyTorch"
146
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
157
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
168
fi
9+
10+
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${TORCH_VERSION}" = "1.7.0" ]; then
11+
echo "Fix nvcc for PyTorch 1.7.0"
12+
sed -i.bak '/static constexpr Symbol Kind/d' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/ir/ir.h
13+
fi

0 commit comments

Comments
 (0)