@@ -35,7 +35,7 @@ if [[ $PLATFORM == windows* ]]; then
35
35
export PYTHON_BIN_PATH=$( which python.exe)
36
36
fi
37
37
38
- PYTORCH_VERSION=2.1.2
38
+ PYTORCH_VERSION=2.2.1
39
39
40
40
export PYTORCH_BUILD_VERSION=" $PYTORCH_VERSION "
41
41
export PYTORCH_BUILD_NUMBER=1
@@ -53,8 +53,9 @@ git checkout v$PYTORCH_VERSION
53
53
git submodule update --init --recursive
54
54
git submodule foreach --recursive ' git reset --hard'
55
55
56
- # https://github.com/pytorch/pytorch/pull/66219
57
- # patch -Np1 < ../../../pytorch.patch
56
+ # Fix version of this submodule to allow compilation on windows.
57
+ # Probably could be removed when we upgrade to next version of PyTorch.
58
+ (cd third_party/pocketfft; git checkout 9d3ab05a7fffbc71a492bc6a17be034e83e8f0fe)
58
59
59
60
CPYTHON_HOST_PATH=" $INSTALL_PATH /../../../cpython/cppbuild/$PLATFORM /host/"
60
61
CPYTHON_PATH=" $INSTALL_PATH /../../../cpython/cppbuild/$PLATFORM /"
@@ -165,24 +166,11 @@ sedinplace 's/ build_deps()/ build_deps(); sys.exit()/g' setup.py
165
166
sedinplace ' s/AND NOT DEFINED ENV{CUDAHOSTCXX}//g' cmake/public/cuda.cmake
166
167
sedinplace ' s/CMAKE_CUDA_FLAGS "/CMAKE_CUDA_FLAGS " --use-local-env /g' CMakeLists.txt
167
168
168
- # work around some compiler bugs
169
- sedinplace ' s/!defined(__INTEL_COMPILER))/!defined(__INTEL_COMPILER) \&\& (__GNUC__ < 11))/g' third_party/XNNPACK/src/xnnpack/intrinsics-polyfill.h
170
169
sedinplace ' s/using ExpandingArrayDouble/public: using ExpandingArrayDouble/g' ./torch/csrc/api/include/torch/nn/options/pooling.h
171
- sedinplace ' s/typedef c10::variant/public: typedef c10::variant/g' ./torch/csrc/api/include/torch/nn/options/upsampling.h
172
- sedinplace ' s/std::copysign/copysignf/g' aten/src/ATen/native/cuda/* .cu
173
- sedinplace ' s/std::trunc/truncf/g' aten/src/ATen/native/cuda/* .cu
174
- sedinplace ' s/std::floor/floorf/g' aten/src/ATen/native/cuda/* .cu
175
- sedinplace ' s/std::ceil/ceilf/g' aten/src/ATen/native/cuda/* .cu
176
- sedinplace ' s/round(/roundf(/g' aten/src/ATen/native/cuda/* .cu
177
- sedinplace ' s/floor(/floorf(/g' aten/src/ATen/native/cuda/* .cu
178
- sedinplace ' s/ceil(/ceilf(/g' aten/src/ATen/native/cuda/* .cu
179
- sedinplace ' /#include <thrust\/device_vector.h>/a\
180
- #include <thrust\/host_vector.h>\
181
- ' caffe2/utils/math_gpu.cu
182
170
183
171
# allow setting the build directory and passing CUDA options
184
172
sedinplace " s/BUILD_DIR = .build./BUILD_DIR = os.environ['BUILD_DIR'] if 'BUILD_DIR' in os.environ else 'build'/g" tools/setup_helpers/env.py
185
- sedinplace " s/var.startswith((' BUILD_', ' USE_', ' CMAKE_' ))/var.startswith((' BUILD_', ' USE_', ' CMAKE_', ' CUDA_' ))/g" tools/setup_helpers/cmake.py
173
+ sedinplace ' s/var.startswith((" BUILD_", " USE_", " CMAKE_" ))/var.startswith((" BUILD_", " USE_", " CMAKE_", " CUDA_" ))/g' tools/setup_helpers/cmake.py
186
174
187
175
# allow resizing std::vector<at::indexing::TensorIndex>
188
176
sedinplace ' s/TensorIndex(c10::nullopt_t)/TensorIndex(c10::nullopt_t none = None)/g' aten/src/ATen/TensorIndexing.h
0 commit comments