- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a disassembler for the OpenCL SDK that will display the GPU code produced for a kernel?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ho Jerome,
We do not provide any disassembler for displaying GPU code and currently don't have any plans to provide one. I am curious why you want to look at the disasm. Do you just want to understand what code gets generated or may be for debugging purposes? Please let me know your reasons and I will pass this on to the graphics guys.
Thanks,
Raghu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Raghu,
I am interested in seeing what optimizations the compiler is performing. For example, I have some code that says
X = (cos(a) - cos(b))*(cos(a) + cos(b)). Looking through the disassembly, I was surprised to discover that the VS 2010 C++ compiler generates four calls to cos for that code. I would have expected it to cache and reuse the results of the first two. I am moving this code into a kernel, and I am wondering what optimizations I can expect the kernel compiler to perform.
Jerome
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Raghu
Alike Jerome I just would like to see the generated device dependent asm to get the chance to optimze manually, i.e. change the C code and compile again. Observing the LLVM code in the .ir file was already a good help.
It would be great to have a --gpu_disasm option for the compiler. AMD, NVIDIA have such already.
Best regards, Stephan

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page