Skip to content

Commit

Permalink
cuda 11.1 sparse ver update (fix #281)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischoy committed Dec 25, 2020
1 parent 939ac56 commit 8f53bf9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/broadcast_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ void BroadcastBackwardKernelGPU(
#if defined(CUDART_VERSION) && (CUDART_VERSION < 10010)
TORCH_CHECK(false, "spmm sparse-dense requires CUDA 10.1 or greater");
#elif defined(CUDART_VERSION) && (CUDART_VERSION >= 10010) && \
(CUDART_VERSION < 11100)
(CUDART_VERSION < 11010)
mm_alg = CUSPARSE_MM_ALG_DEFAULT;
#elif defined(CUDART_VERSION) && (CUDART_VERSION >= 11100)
#elif defined(CUDART_VERSION) && (CUDART_VERSION >= 11010)
mm_alg = CUSPARSE_SPMM_ALG_DEFAULT;
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/pooling_avg_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ void NonzeroAvgPoolingForwardKernelGPU(
#if defined(CUDART_VERSION) && (CUDART_VERSION < 10010)
ASSERT(false, "spmm sparse-dense requires CUDA 10.1 or greater");
#elif defined(CUDART_VERSION) && (CUDART_VERSION >= 10010) && \
(CUDART_VERSION < 11100)
(CUDART_VERSION < 11010)
mm_alg = CUSPARSE_COOMM_ALG1;
static_assert(is_int32, "int64 cusparseSpMM requires CUDA 11.1 or greater");
#elif defined(CUDART_VERSION) && (CUDART_VERSION >= 11100)
#elif defined(CUDART_VERSION) && (CUDART_VERSION >= 11010)
mm_alg = CUSPARSE_SPMM_COO_ALG1;
static_assert(is_int32 || is_int64, "Invalid index type");
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/spmm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ torch::Tensor coo_spmm(torch::Tensor const &rows, torch::Tensor const &cols,
#if defined(CUDART_VERSION) && (CUDART_VERSION < 10010)
TORCH_CHECK(false, "spmm sparse-dense requires CUDA 10.1 or greater");
#elif defined(CUDART_VERSION) && (CUDART_VERSION >= 10010) && \
(CUDART_VERSION < 11100)
(CUDART_VERSION < 11010)
switch (spmm_algorithm_id) {
case 1:
mm_alg = CUSPARSE_COOMM_ALG1;
Expand All @@ -89,7 +89,7 @@ torch::Tensor coo_spmm(torch::Tensor const &rows, torch::Tensor const &cols,
mm_alg = CUSPARSE_MM_ALG_DEFAULT;
}
TORCH_CHECK(is_int32, "int64 cusparseSpMM requires CUDA 11.1 or greater");
#elif defined(CUDART_VERSION) && (CUDART_VERSION >= 11100)
#elif defined(CUDART_VERSION) && (CUDART_VERSION >= 11010)
switch (spmm_algorithm_id) {
case 1:
mm_alg = CUSPARSE_SPMM_COO_ALG1;
Expand Down
4 changes: 2 additions & 2 deletions tests/python/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
MinkowskiSumPooling,
MinkowskiAvgPooling,
MinkowskiMaxPooling,
MinkowskiPoolingTransposeFunction,
MinkowskiPoolingTranspose,
# MinkowskiPoolingTransposeFunction,
# MinkowskiPoolingTranspose,
MinkowskiGlobalPoolingFunction,
MinkowskiGlobalPooling,
MinkowskiGlobalSumPooling,
Expand Down

0 comments on commit 8f53bf9

Please sign in to comment.