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-sparse
Commits
1ae404f1
"git@developer.sourcefind.cn:OpenDAS/ktransformers.git" did not exist on "1dcb8dae5b94e4af56d023cce359e52657d0d14e"
Commit
1ae404f1
authored
Aug 05, 2020
by
rusty1s
Browse files
build for pytorch 1.6.0
parent
4d676cd3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
39 deletions
+89
-39
.travis.yml
.travis.yml
+81
-38
script/torch.sh
script/torch.sh
+8
-1
No files found.
.travis.yml
View file @
1ae404f1
...
@@ -8,47 +8,90 @@ os:
...
@@ -8,47 +8,90 @@ os:
env
:
env
:
global
:
global
:
-
CUDA_HOME=/usr/local/cuda
-
CUDA_HOME=/usr/local/cuda
jobs
:
jobs
:
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cpu
# Python 3.6
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu92
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cpu
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu101
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu92
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu102
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu101
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cpu
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu102
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu92
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cpu
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu101
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu92
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu102
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu101
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cpu
-
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu102
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu92
# Python 3.7
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu101
-
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cpu
-
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu102
-
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.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
:
jobs
:
exclude
:
# Exclude *all* macOS CUDA jobs and Windows CUDA 9.2 jobs.
# For daily builds, we only test on *Python 3.6* and *CUDA 10.2*.
-
os
:
osx
# For deployment, we exclude *all* macOS CUDA and Windows CUDA 9.2 jobs.
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu92
exclude
:
-
os
:
osx
# Python 3.6
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu101
-
if
:
not (tag is present or commit_message =~ ci-deploy) and os != osx
-
os
:
osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cpu
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu102
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
-
os
:
osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu92
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu92
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
-
os
:
osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu101
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu101
-
if
:
os = osx
-
os
:
osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu102
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu102
-
if
:
not (tag is present or commit_message =~ ci-deploy) and os != osx
-
os
:
osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cpu
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu92
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
-
os
:
osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu92
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu101
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
-
os
:
osx
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu101
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu102
-
if
:
os = osx
-
os
:
windows
env
:
PYTHON_VERSION=3.6 TORCH_VERSION=1.5.0 IDX=cu102
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu92
# Python 3.7
-
os
:
windows
-
if
:
not (tag is present or commit_message =~ ci-deploy)
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu92
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cpu
-
os
:
windows
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os != linux
env
:
TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu92
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.6.0 IDX=cu92
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
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
-
if
:
not (tag is present or commit_message =~ ci-deploy)
env
:
PYTHON_VERSION=3.7 TORCH_VERSION=1.5.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
-
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
-
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
-
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
env
:
PYTHON_VERSION=3.8 TORCH_VERSION=1.6.0 IDX=cu92
-
if
:
not (tag is present or commit_message =~ ci-deploy) or os = osx
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
:
install
:
-
source script/gcc.sh
-
source script/gcc.sh
...
...
script/torch.sh
View file @
1ae404f1
#!/bin/bash
#!/bin/bash
# Fix "member may not be initialized" error on Windows: https://github.com/pytorch/pytorch/issues/27958
# Fix "member may not be initialized" error on Windows: https://github.com/pytorch/pytorch/issues/27958
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
;
then
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/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/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
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
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"
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
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