Skip to content

Commit 1096a4f

Browse files
committed
Fix IS_SPMM_AVAILABLE macro definition
This should fix CUDA-11 on Windows build issue
1 parent 54ffb05 commit 1096a4f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

aten/src/ATen/native/sparse/cuda/SparseCUDABlas.cu

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
// Using these APIs in any other systems will result in compile-time or run-time failures.
1616
// Their support will be extended in the next releases.
1717

18-
#define IS_SPMM_AVAILABLE() (defined(__CUDACC__) && \
19-
(CUSPARSE_VERSION >= 11000 || \
20-
(!defined(_MSC_VER) && CUSPARSE_VERSION >= 10301)))
18+
#if defined(__CUDACC__) && (CUSPARSE_VERSION >= 11000 || (!defined(_MSC_VER) && CUSPARSE_VERSION >= 10301))
19+
#define IS_SPMM_AVAILABLE() 1
20+
#else
21+
#define IS_SPMM_AVAILABLE() 0
22+
#endif
2123

2224
#if IS_SPMM_AVAILABLE()
2325
#include <library_types.h>

0 commit comments

Comments
 (0)