How at::mm works? Where is the source code?

Hi! I am interested in how at::mm works, and I can not find its source code….especially when using GPU, does mm uses cublas directly? Or how to… parallelly computes?

Thank you!!!

Yes, cublas will be used on the GPU as seen here.

Thank you!! But I did not find at::mm function in this link, I guess here exist many other CUDA blas implementation… Could you specify where is the at::mm function is? Thank you!!

You can fine the mm definition in native_functions.yaml here and follow their GPU dispatching to mm_out_cuda and eventually to addmm_out_cuda here.

1 Like