Convolution arithmetic for cuda/cudnn

I found convolution implementation in cuda here. I am not able to figure out what’s exactly happening there.

I guess it won’t be doing sliding window and then dot product and addition for each window. Can you please share the arithmetic that’s happening while doing convolution operation in cuda/cudnn?

Thank you!

The native convolution operation in PyTorch use a matrix multiplication after unfolding the input (often referred as im2col), while the cudnn implementations are closed source, but you might be able to get some information about the used algorithms in their docs.

1 Like