Skip to content

Commit 97678ce

Browse files
committed
[mlir][sparse][gpu] remove zero init memset
avoids quite a big memory fill for each setup Reviewed By: K-Wu Differential Revision: https://reviews.llvm.org/D155251
1 parent 682fe17 commit 97678ce

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,6 @@ mgpuCreateCuSparseLtDnMat(void *dh, intptr_t rows, intptr_t cols, void *values,
528528
int32_t dtp, CUstream /*stream*/) {
529529
assert(cusparseLt_initiated && "client did not call mgpuCreateSparseLtEnv()");
530530
auto dnmat_handle = reinterpret_cast<cusparseLtDnMatHandleAndData *>(dh);
531-
// CusparseLt expects the descriptors to be zero-initialized.
532-
memset(dnmat_handle, 0, sizeof(cusparseLtDnMatHandleAndData));
533531
dnmat_handle->values = values;
534532
auto dTp = static_cast<cudaDataType_t>(dtp);
535533
// Assume row-major when deciding lda.
@@ -550,8 +548,6 @@ mgpuCusparseLtCreate2To4SpMat(void *sh, intptr_t rows, intptr_t cols,
550548
void *values, int32_t dtp, CUstream /*stream*/) {
551549
assert(cusparseLt_initiated && "client did not call mgpuCreateSparseLtEnv()");
552550
auto spmat_handle = reinterpret_cast<cusparseLtSpMatHandleAndData *>(sh);
553-
// CusparseLt expects the descriptors to be zero-initialized.
554-
memset(spmat_handle, 0, sizeof(cusparseLtSpMatHandleAndData));
555551
spmat_handle->values = values;
556552
auto dTp = static_cast<cudaDataType_t>(dtp);
557553
// Assume row-major when deciding lda.

0 commit comments

Comments
 (0)