The nvmath.bindings module is experimental and potentially subject to future changes.

sp_gemm_estimate_memory_buffersize2#

nvmath.bindings.cusparse.sp_gemm_estimate_memory_buffersize2(
intptr_t handle,
int op_a,
int op_b,
intptr_t alpha,
intptr_t mat_a,
intptr_t mat_b,
intptr_t beta,
intptr_t mat_c,
int compute_type,
int alg,
intptr_t spgemm_descr,
float chunk_fraction,
size_t buffer_size3,
intptr_t external_buffer3,
) size_t[source]#

See cusparseSpGEMM_estimateMemory.

Call this function after allocating buffer_size3 bytes of device memory for external_buffer3. The temporary external_buffer3 allocation can be freed after this call.