GPU Compute Software
Ask questions about Intel® Graphics Compute software technologies, such as OpenCL* GPU driver and oneAPI Level Zero
156 Discussions

OpenCL GPU Assembly

JEROME_B_Intel1
Employee
1,911 Views

I have an OpenCL program that builds and executes a number of kernels. I would like to look at the generated assembly code, to try to see why it is running so slowly on Intel PVC HW. How can I generate and examine PVC assembly?

0 Kudos
2 Replies
Ben_A_Intel
Employee
1,863 Views

Hello!  There are several options to look at the generated assembly for Intel GPUs with various pros and cons.  Ultimately, the best option will depend on the tools you are most familiar with:

  1. VTune can show you GPU assembly and other GPU-related profiling information (I don't have a ton of experience with this myself).
  2. The OpenCL Intercept Layer can collect GPU assembly while your program is running, see instructions here: https://github.com/intel/opencl-intercept-layer/blob/main/docs/kernel_isa_gpu.md
  3. You can use the "ocloc" offline compiler to compile OpenCL kernels to GPU assembly offline.
  4. You can use IGC "shader dumps" to dump the GPU assembly it generates, which can also include source line information if you pass the right program build options.  See this recent issue with the steps I used to do this recently: https://github.com/intel/opencl-intercept-layer/issues/310

Hope this helps!

0 Kudos
Anita_Intel
Employee
1,823 Views

Dear User,

If you are using MS Visual Studio, here are some links to Intel OpenCL code builder.

Introduction to GEN Assembly (intel.com)


You can also try several options provided by Ben in previous reply and share us your results.

Hope this works!!


Thanks


0 Kudos
Reply