Skip to content

Commit 89cf697

Browse files
xw285cornellfacebook-github-bot
authored andcommitted
[CUDA12] Clean up deprecated APIs (#91050)
Summary: Pull Request resolved: #91050 Some APIs are deprecated in newer version of CUDA. * cudaGraphInstantiate: From: ``` cudaGraphInstantiate ( cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphNode_t* pErrorNode, char* pLogBuffer, size_t bufferSize ) ``` To ``` __host__​cudaError_t cudaGraphInstantiate ( cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags = 0 ) ``` * cudaProfilerInitialize: deprecated in cuda 11 and removed in cuda 12 Test Plan: GH CI Reviewed By: jianyuh Differential Revision: D41469051 fbshipit-source-id: b4e856717fc48672e7af5d2baba7931a31273c6d
1 parent 85e393b commit 89cf697

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

aten/src/ATen/cuda/CUDASparseDescriptors.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ class TORCH_CUDA_CPP_API CuSparseDnVecDescriptor
143143
class TORCH_CUDA_CPP_API CuSparseSpMatDescriptor
144144
: public CuSparseDescriptor<cusparseSpMatDescr, &cusparseDestroySpMat> {};
145145

146-
#endif //AT_USE_HIPSPARSE_GENERIC_52_API() || (AT_USE_CUSPARSE_GENERIC_API() || AT_USE_CUSPARSE_NON_CONST_DESCRIPTORS())
146+
//AT_USE_HIPSPARSE_GENERIC_52_API() || (AT_USE_CUSPARSE_GENERIC_API() && AT_USE_CUSPARSE_NON_CONST_DESCRIPTORS())
147147

148-
#if AT_USE_CUSPARSE_CONST_DESCRIPTORS()
148+
#elif AT_USE_CUSPARSE_CONST_DESCRIPTORS()
149149
class TORCH_CUDA_CPP_API CuSparseDnMatDescriptor
150150
: public ConstCuSparseDescriptor<
151151
cusparseDnMatDescr,

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ void _csrmm2(
163163
descA, descB,
164164
beta,
165165
descC,
166-
cusparse_value_type, /* data type in which the computation is executed */
167-
CUSPARSE_SPMM_CSR_ALG1, /* default computing algorithm for CSR sparse matrix format */
168-
&bufferSize /* output */
166+
cusparse_value_type, /* data type in which the computation is executed */
167+
CUSPARSE_SPMM_CSR_ALG1, /* default computing algorithm for CSR sparse matrix format */
168+
&bufferSize /* output */
169169
));
170170

171171
auto& allocator = *c10::cuda::CUDACachingAllocator::get();
@@ -177,9 +177,9 @@ void _csrmm2(
177177
descA, descB,
178178
beta,
179179
descC,
180-
cusparse_value_type, /* data type in which the computation is executed */
181-
CUSPARSE_SPMM_CSR_ALG1, /* default computing algorithm for CSR sparse matrix format */
182-
dataPtr.get() /* external buffer */
180+
cusparse_value_type, /* data type in which the computation is executed */
181+
CUSPARSE_SPMM_CSR_ALG1, /* default computing algorithm for CSR sparse matrix format */
182+
dataPtr.get() /* external buffer */
183183
));
184184

185185
TORCH_CUDASPARSE_CHECK(cusparseDestroySpMat(descA));

0 commit comments

Comments
 (0)