Commit ca3f6c7f authored by rusty1s's avatar rusty1s
Browse files

potential windows fix

parent 01ab13d0
...@@ -27,7 +27,7 @@ env: ...@@ -27,7 +27,7 @@ env:
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu101 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu101
jobs: jobs:
exclude: # Exclude all macOS CUDA jobs and Windows cu100 job. exclude: # Exclude all macOS CUDA jobs and Windows CUDA 10.0 jobs.
- os: osx - os: osx
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92 env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92
- os: osx - os: osx
...@@ -63,8 +63,8 @@ jobs: ...@@ -63,8 +63,8 @@ jobs:
install: install:
- source script/cuda.sh
- source script/conda.sh - source script/conda.sh
- source script/cuda.sh
- conda create --yes -n test python=${PYTHON_VERSION} - conda create --yes -n test python=${PYTHON_VERSION}
- source activate test - source activate test
- if [ ${TRAVIS_OS_NAME} = "windows" ] || [ $IDX != "cu92" ]; then conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch -c defaults -c numba/label/dev --yes; else conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch --yes; fi - if [ ${TRAVIS_OS_NAME} = "windows" ] || [ $IDX != "cu92" ]; then conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch -c defaults -c numba/label/dev --yes; else conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch --yes; fi
......
...@@ -102,3 +102,10 @@ if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" = "cu92" ]; then ...@@ -102,3 +102,10 @@ if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" = "cu92" ]; then
sed -i.bak -e '129,141d' "${CUDA_PATH}/include/crt/host_config.h" sed -i.bak -e '129,141d' "${CUDA_PATH}/include/crt/host_config.h"
cat -n "${CUDA_HOME}/include/crt/host_config.h" cat -n "${CUDA_HOME}/include/crt/host_config.h"
fi fi
# Fix "member may not be initialized" error on Windows: https://github.com/pytorch/pytorch/issues/27958
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" != "cpu" ]; then
sed -i.bak -e 's/constexpr/const/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/script/module.h
sed -i.bak -e 's/constexpr/const/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/script/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
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