CUPY to use with PyTorch (import and use the whole CUDA library)

(Space Invader) #1

I’m not a CUDA and PyTorch expert, that’s why my question may sound silly.
I know how to use CuPy with PyTorch too write my own kernels as python strings and call them using PyTorch.
But I don’t know how to work with the whole CUDA library, e.g.

Could you please give an example? SpGEMM (sparse matrix by sparse matrix dot product) is crucial for my research!