File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 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
168fi
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
You can’t perform that action at this time.
0 commit comments