Commit 8f5a1e3a authored by rusty1s's avatar rusty1s
Browse files

build for pytorch 1.6.0

parent aba2c714
......@@ -8,47 +8,90 @@ os:
env:
global:
- CUDA_HOME=/usr/local/cuda
jobs:
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cpu
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu92
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu101
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu102
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cpu
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu92
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu101
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu102
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cpu
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu92
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu101
- TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu102
# Python 3.6
- 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.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.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:
exclude: # Exclude *all* macOS CUDA jobs and Windows CUDA 9.2 jobs.
- os: osx
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu92
- os: osx
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu101
- os: osx
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu102
- os: osx
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu92
- os: osx
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu101
- os: osx
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu102
- os: osx
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu92
- os: osx
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu101
- os: osx
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu102
- os: windows
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.8 IDX=cu92
- os: windows
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.7 IDX=cu92
- os: windows
env: TORCH_VERSION=1.5.0 PYTHON_VERSION=3.6 IDX=cu92
# For daily builds, we only test on *Python 3.6* and *CUDA 10.2*.
# 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.6.0 IDX=cpu
- if: not (tag is present or commit_message =~ ci-deploy) or os != linux
env: PYTHON_VERSION=3.6 TORCH_VERSION=1.6.0 IDX=cu92
- if: not (tag is present or commit_message =~ ci-deploy) or os = osx
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
- 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
- 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
- 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
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:
- source script/gcc.sh
......
#!/bin/bash
# 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/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"
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment