blob: 47dd78ad195c73cfe7f5183424f39c24091afdf6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
|