How to see gpu kernels which are ran on GPU

Hi all,

I have two question about the gpu kernels.

  1. Is there any way to get the gpu kernel code that pytorch generates to run them on GPU? For example, running a 2D convolution layer need a kernel. I want to see that kernel file.

  2. Is there any documentation that explains how to setup the pytorch with PoCL compiler.

Best regards

  1. You could profile the code using the PyTorch profiler or e.g. Nsight Systems to get the kernel names. Depending on the actual kernel you could then search for it in the repository to see its implementation. If a closed third party library isused (e.g. cuDNN) you won’t be able to read the code.

  2. I’m now aware of any resources for it.