Skip to content

Commit

Permalink
print
Browse files Browse the repository at this point in the history
  • Loading branch information
FantasyVR committed Aug 11, 2022
1 parent d851b48 commit 38fa224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion taichi/program/sparse_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ void CuSparseMatrix::spmv(Program *prog, const Ndarray &x, Ndarray &y) {
CUSPARSEDriver::get_instance().cpSpMV_bufferSize(
cusparse_handle, CUSPARSE_OPERATION_NON_TRANSPOSE, &alpha, matrix_, vecX,
&beta, vecY, CUDA_R_32F, CUSPARSE_SPMV_CSR_ALG1, &bufferSize);
printf("spmv bufferSize: %zu\n", bufferSize);

void *dBuffer = NULL;
CUDAContext::get_instance().make_current();
CUDADriver::get_instance().malloc(&dBuffer, bufferSize);
printf("spmv bufferSize: %zu\n", bufferSize);
CUSPARSEDriver::get_instance().cpSpMV(
cusparse_handle, CUSPARSE_OPERATION_NON_TRANSPOSE, &alpha, matrix_, vecX,
&beta, vecY, CUDA_R_32F, CUSPARSE_SPMV_CSR_ALG1, dBuffer);
Expand Down

0 comments on commit 38fa224

Please sign in to comment.