Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-spline-conv
Commits
759d31d0
Commit
759d31d0
authored
Nov 01, 2020
by
rusty1s
Browse files
update to cu110 + pytorch 1.7.0
parent
ee8369a7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
85 deletions
+108
-85
.travis.yml
.travis.yml
+42
-33
README.md
README.md
+13
-27
script/cuda.sh
script/cuda.sh
+45
-14
script/rename_wheel.py
script/rename_wheel.py
+1
-1
script/torch.sh
script/torch.sh
+7
-10
No files found.
.travis.yml
View file @
759d31d0
...
...
@@ -10,38 +10,51 @@ env:
-
CUDA_HOME=/usr/local/cuda
jobs
:
# Python 3.6
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cpu
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu92
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu101
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu102
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu110
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cpu
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu92
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu101
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu102
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cpu
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu92
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu101
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu102
# Python 3.7
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cpu
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu92
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu101
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu102
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu110
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cpu
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu92
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu101
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu102
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cpu
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu92
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu101
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu102
# Python 3.8
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cpu
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu92
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu101
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu102
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu110
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cpu
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu92
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu101
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu102
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cpu
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu92
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu101
-
PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu102
jobs
:
# For daily builds, we only test on
*
Python 3.6
* and *
CUDA 10.2
*
.
# For daily builds, we only test on Python 3.6
with
CUDA 10.2
/11.0
.
# For deployment, we exclude *all* macOS CUDA and Windows CUDA 9.2 jobs.
exclude
:
# Python 3.6
-
if
:
not (tag is present or commit_message =~ ci-deploy) and os != osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cpu
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu92
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu101
-
if
:
os = osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu102
-
if
:
os = osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.7.0 IDX=cu110
-
if
:
not (tag is present or commit_message =~ ci-deploy) and os != osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cpu
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
...
...
@@ -50,15 +63,17 @@ jobs:
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu101
-
if
:
os = osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu102
-
if
:
not (tag is present or commit_message =~ ci-deploy) and os != osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cpu
# Python 3.7
-
if
:
not (tag is present or commit_message =~ ci-deploy)
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cpu
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
env
:
PYTHON_VERSION=3.
6
TORCH_VERSION=1.
5
.0 IDX=cu92
env
:
PYTHON_VERSION=3.
7
TORCH_VERSION=1.
7
.0 IDX=cu92
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu101
-
if
:
os = osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu102
# Python 3.7
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu101
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu102
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.7.0 IDX=cu110
-
if
:
not (tag is present or commit_message =~ ci-deploy)
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cpu
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
...
...
@@ -67,15 +82,17 @@ jobs:
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu101
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu102
# Python 3.8
-
if
:
not (tag is present or commit_message =~ ci-deploy)
env
:
PYTHON_VERSION=3.
7
TORCH_VERSION=1.
5
.0 IDX=cpu
env
:
PYTHON_VERSION=3.
8
TORCH_VERSION=1.
7
.0 IDX=cpu
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
env
:
PYTHON_VERSION=3.
7
TORCH_VERSION=1.
5
.0 IDX=cu92
env
:
PYTHON_VERSION=3.
8
TORCH_VERSION=1.
7
.0 IDX=cu92
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.
7
TORCH_VERSION=1.
5
.0 IDX=cu101
env
:
PYTHON_VERSION=3.
8
TORCH_VERSION=1.
7
.0 IDX=cu101
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.5.0 IDX=cu102
# Python 3.8
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu102
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.7.0 IDX=cu110
-
if
:
not (tag is present or commit_message =~ ci-deploy)
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cpu
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
...
...
@@ -84,14 +101,6 @@ jobs:
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu101
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu102
-
if
:
not (tag is present or commit_message =~ ci-deploy)
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cpu
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu92
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu101
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.5.0 IDX=cu102
install
:
-
source script/gcc.sh
...
...
README.md
View file @
759d31d0
...
...
@@ -25,28 +25,28 @@ The operator works on all floating point data types and is implemented both for
We provide pip wheels for all major OS/PyTorch/CUDA combinations, see
[
here
](
https://pytorch-geometric.com/whl
)
.
#### PyTorch 1.
6
.0
#### PyTorch 1.
7
.0
To install the binaries for PyTorch 1.
6
.0, simply run
To install the binaries for PyTorch 1.
7
.0, simply run
```
pip install torch-spline-conv==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.
6
.0.html
pip install torch-spline-conv==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.
7
.0.html
```
where
`${CUDA}`
should be replaced by either
`cpu`
,
`cu92`
,
`cu101`
or
`cu10
2
`
depending on your PyTorch installation.
where
`${CUDA}`
should be replaced by either
`cpu`
,
`cu92`
,
`cu101`
,
`cu102`
,
or
`cu1
1
0`
depending on your PyTorch installation.
| |
`cpu`
|
`cu92`
|
`cu101`
|
`cu102`
|
|-------------|-------|--------|---------|---------|
|
**Linux**
| ✅ | ✅ | ✅ | ✅ |
|
**Windows**
| ✅ | ❌ | ✅ | ✅ |
|
**macOS**
| ✅ | | | |
| |
`cpu`
|
`cu92`
|
`cu101`
|
`cu102`
|
`cu110`
|
|-------------|-------|--------|---------|---------|
---------|
|
**Linux**
| ✅ | ✅ | ✅ | ✅ |
✅ |
|
**Windows**
| ✅ | ❌ | ✅ | ✅ |
✅ |
|
**macOS**
| ✅ | | | |
|
#### PyTorch 1.
5
.0
#### PyTorch 1.
6
.0
To install the binaries for PyTorch 1.
5
.0, simply run
To install the binaries for PyTorch 1.
6
.0, simply run
```
pip install torch-spline-conv==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.
5
.0.html
pip install torch-spline-conv==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.
6
.0.html
```
where
`${CUDA}`
should be replaced by either
`cpu`
,
`cu92`
,
`cu101`
or
`cu102`
depending on your PyTorch installation.
...
...
@@ -57,21 +57,7 @@ where `${CUDA}` should be replaced by either `cpu`, `cu92`, `cu101` or `cu102` d
|
**Windows**
| ✅ | ❌ | ✅ | ✅ |
|
**macOS**
| ✅ | | | |
#### PyTorch 1.4.0
To install the binaries for PyTorch 1.4.0, simply run
```
pip install torch-spline-conv==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.4.0.html
```
where
`${CUDA}`
should be replaced by either
`cpu`
,
`cu92`
,
`cu100`
or
`cu101`
depending on your PyTorch installation.
| |
`cpu`
|
`cu92`
|
`cu100`
|
`cu101`
|
|-------------|-------|--------|---------|---------|
|
**Linux**
| ✅ | ✅ | ✅ | ✅ |
|
**Windows**
| ✅ | ❌ | ❌ | ✅ |
|
**macOS**
| ✅ | | | |
**Note:**
Binaries of older versions are also provided for PyTorch 1.4.0 and PyTorch 1.5.0 (following the same procedure).
### From source
...
...
script/cuda.sh
View file @
759d31d0
...
...
@@ -8,16 +8,14 @@ if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "$IDX" = "cu92" ]; then
export
CUDA_SHORT
=
9.2
export
CUDA
=
9.2.148-1
export
UBUNTU_VERSION
=
ubuntu1604
export
CUBLAS
=
cuda-cublas-dev-9-2
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
$IDX
"
=
"cu101"
]
;
then
export
IDX
=
cu101
export
CUDA_SHORT
=
10.1
export
CUDA
=
10.1.
105
-1
export
CUDA
=
10.1.
243
-1
export
UBUNTU_VERSION
=
ubuntu1804
export
CUBLAS
=
libcublas-dev
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
...
...
@@ -26,7 +24,11 @@ if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "$IDX" = "cu102" ]; then
export
CUDA_SHORT
=
10.2
export
CUDA
=
10.2.89-1
export
UBUNTU_VERSION
=
ubuntu1804
export
CUBLAS
=
libcublas-dev
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
$IDX
"
=
"cu110"
]
;
then
export
CUDA_SHORT
=
11.0
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
...
...
@@ -55,6 +57,13 @@ if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "$IDX" = "cu102" ]; then
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
$IDX
"
=
"cu110"
]
;
then
export
CUDA_SHORT
=
11.0
export
CUDA_URL
=
https://developer.download.nvidia.com/compute/cuda/
${
CUDA_SHORT
}
.2/local_installers
export
CUDA_FILE
=
cuda_
${
CUDA_SHORT
}
.2_451.48_win10.exe
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"osx"
]
&&
[
"
$IDX
"
=
"cpu"
]
;
then
export
TOOLKIT
=
""
fi
...
...
@@ -65,14 +74,41 @@ else
export
FORCE_CUDA
=
1
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
;
then
INSTALLER
=
cuda-repo-
${
UBUNTU_VERSION
}
_
${
CUDA
}
_amd64.deb
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
&&
[
"
${
IDX
}
"
!=
"cu110"
]
;
then
INSTALLER
=
"
cuda-repo-
${
UBUNTU_VERSION
}
_
${
CUDA
}
_amd64.deb
"
wget
-nv
"http://developer.download.nvidia.com/compute/cuda/repos/
${
UBUNTU_VERSION
}
/x86_64/
${
INSTALLER
}
"
sudo
dpkg
-i
"
${
INSTALLER
}
"
wget
-nv
"https://developer.download.nvidia.com/compute/cuda/repos/
${
UBUNTU_VERSION
}
/x86_64/7fa2af80.pub"
sudo
apt-key add 7fa2af80.pub
sudo
apt update
-qq
sudo
apt
install
-y
"cuda-core-
${
CUDA_SHORT
/./-
}
"
"cuda-cudart-dev-
${
CUDA_SHORT
/./-
}
"
"
${
CUBLAS
}
"
"cuda-cusparse-dev-
${
CUDA_SHORT
/./-
}
"
sudo
apt
install
"cuda-core-
${
CUDA_SHORT
/./-
}
"
"cuda-nvcc-
${
CUDA_SHORT
/./-
}
"
"cuda-libraries-dev-
${
CUDA_SHORT
/./-
}
"
sudo
apt clean
CUDA_HOME
=
/usr/local/cuda-
${
CUDA_SHORT
}
LD_LIBRARY_PATH
=
${
CUDA_HOME
}
/lib64:
${
LD_LIBRARY_PATH
}
PATH
=
${
CUDA_HOME
}
/bin:
${
PATH
}
nvcc
--version
echo
'----------'
sudo
find /
-name
"*cublas*"
echo
'----------'
# Fix cublas on CUDA 10.1:
if
[
-d
"/usr/local/cuda-10.2/targets/x86_64-linux/include"
]
;
then
sudo cp
-r
/usr/local/cuda-10.2/targets/x86_64-linux/include/
*
"
${
CUDA_HOME
}
/include/"
fi
if
[
-d
"/usr/local/cuda-10.2/targets/x86_64-linux/lib"
]
;
then
sudo cp
-r
/usr/local/cuda-10.2/targets/x86_64-linux/lib/
*
"
${
CUDA_HOME
}
/lib/"
fi
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
${
IDX
}
"
=
"cu110"
]
;
then
wget
-nv
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv
cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
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
sudo
dpkg
-i
cuda-repo-ubuntu1804-11-0-local_11.0.3-450.51.06-1_amd64.deb
sudo
apt-key add /var/cuda-repo-ubuntu1804-11-0-local/7fa2af80.pub
sudo
apt update
-qq
sudo
apt
install
cuda-nvcc-11-0 cuda-libraries-dev-11-0
sudo
apt clean
CUDA_HOME
=
/usr/local/cuda-
${
CUDA_SHORT
}
LD_LIBRARY_PATH
=
${
CUDA_HOME
}
/lib64:
${
LD_LIBRARY_PATH
}
...
...
@@ -86,16 +122,11 @@ if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" != "cpu" ]; then
curl
-k
-L
"https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download"
--output
"/tmp/gpu_driver_dlls.zip"
7z x
"/tmp/gpu_driver_dlls.zip"
-o
"/c/Windows/System32"
# Install CUDA
# Install CUDA
:
wget
-nv
"
${
CUDA_URL
}
/
${
CUDA_FILE
}
"
PowerShell
-Command
"Start-Process -FilePath
\"
${
CUDA_FILE
}
\"
-ArgumentList
\"
-s nvcc_
${
CUDA_SHORT
}
cu
blas_dev_
${
CUDA_SHORT
}
cusparse
_dev_
${
CUDA_SHORT
}
\"
-Wait -NoNewWindow"
PowerShell
-Command
"Start-Process -FilePath
\"
${
CUDA_FILE
}
\"
-ArgumentList
\"
-s nvcc_
${
CUDA_SHORT
}
cu
objdump_
${
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"
CUDA_HOME
=
/c/Program
\
Files/NVIDIA
\
GPU
\
Computing
\
Toolkit/CUDA/v
${
CUDA_SHORT
}
PATH
=
${
CUDA_HOME
}
/bin:
$PATH
PATH
=
/c/Program
\
Files
\ \(
x86
\)
/Microsoft
\
Visual
\
Studio/2017/BuildTools/MSBuild/15.0/Bin:
$PATH
nvcc
--version
fi
# Fix Cuda9.2 on Windows: https://github.com/pytorch/pytorch/issues/6109
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
IDX
}
"
=
"cu92"
]
;
then
sed
-i
.bak
-e
'129,141d'
"
${
CUDA_HOME
}
/include/crt/host_config.h"
fi
script/rename_wheel.py
View file @
759d31d0
...
...
@@ -5,7 +5,7 @@ import glob
import
shutil
idx
=
sys
.
argv
[
1
]
assert
idx
in
[
'cpu'
,
'cu92'
,
'cu101'
,
'cu102'
]
assert
idx
in
[
'cpu'
,
'cu92'
,
'cu101'
,
'cu102'
,
'cu110'
]
dist_dir
=
osp
.
join
(
osp
.
dirname
(
osp
.
abspath
(
__file__
)),
'..'
,
'dist'
)
wheels
=
glob
.
glob
(
osp
.
join
(
'dist'
,
'**'
,
'*.whl'
),
recursive
=
True
)
...
...
script/torch.sh
View file @
759d31d0
#!/bin/bash
# Fix "member may not be initialized" error on Windows: https://github.com/pytorch/pytorch/issues/27958
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
TORCH_VERSION
}
"
=
"1.5.0"
]
;
then
echo
"Fix nvcc for PyTorch 1.5.0"
sed
-i
.bak
-e
's/constexpr/const/g'
/c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/api/module.h
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
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
fi
# https://github.com/pytorch/pytorch/commit/d2e16dd888a9b5fd55bd475d4fcffb70f388d4f0
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
TORCH_VERSION
}
"
=
"1.6.0"
]
;
then
echo
"Fix nvcc for PyTorch
1.6.0
"
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
;
then
echo
"Fix nvcc for PyTorch"
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
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
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
TORCH_VERSION
}
"
=
"1.7.0"
]
;
then
echo
"Fix nvcc for PyTorch 1.7.0"
sed
-i
.bak
'/static constexpr Symbol Kind/d'
/c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/ir/ir.h
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment