aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libtorch/fix-pytorch-pr-156630.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/libtorch/fix-pytorch-pr-156630.patch')
-rw-r--r--vcpkg/ports/libtorch/fix-pytorch-pr-156630.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/vcpkg/ports/libtorch/fix-pytorch-pr-156630.patch b/vcpkg/ports/libtorch/fix-pytorch-pr-156630.patch
new file mode 100644
index 0000000..47dd78a
--- /dev/null
+++ b/vcpkg/ports/libtorch/fix-pytorch-pr-156630.patch
@@ -0,0 +1,29 @@
+diff --git a/aten/src/ATen/native/cuda/SegmentReduce.cu b/aten/src/ATen/native/cuda/SegmentReduce.cu
+index 04bec04..3ea8af2 100644
+--- a/aten/src/ATen/native/cuda/SegmentReduce.cu
++++ b/aten/src/ATen/native/cuda/SegmentReduce.cu
+@@ -1,5 +1,6 @@
+ #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
+ #include <ATen/native/SegmentReduce.h>
++#include <cuda_runtime.h>
+
+ #include <ATen/core/Tensor.h>
+ #include <ATen/Dispatch.h>
+@@ -17,6 +18,10 @@
+ #include <ATen/ops/cumsum.h>
+ #endif
+
++// SegmentReduce compilation with CUDA-12.9 causes NVCC crash on Windows
++// See https://github.com/pytorch/pytorch/issues/156181
++#if !defined(_WIN32) || CUDART_VERSION < 12090
++
+ namespace at::native {
+
+ namespace {
+@@ -600,3 +605,5 @@ REGISTER_DISPATCH(
+ &_segment_reduce_offsets_backward_cuda_kernel);
+
+ } // namespace at::native
++
++#endif // !defined(_WIN32) || CUDART_VERSION < 12090
+\ No newline at end of file