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 +#include #include #include @@ -17,6 +18,10 @@ #include #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