Hello,
I was told to move this question: http://devgurus.amd.com/message/1282023#1282023 here.
For a project I am currently working on, I am required to generate IL bytecode. I can generate IL assembler from OpenCL via a variety of tools, so I was wondering if anyone had a utility to convert this ASCII IL into the binary format. I figure since the IL specification was released there is no reason for such an assembler to be private.
I don't necessarily need source code, but it would be the most useful. Does anyone have or know where I can find such an assembler? I'd really like to avoid the tedium of making my own.
Thank you,
Andrew
Solved! Go to Solution.
This is not an officially supported one, but I bet Kernel Analyzer does it the same way.
Look for calcl.h in the SDK include directory.
calclCompile() - you can compile an executable image with this.
calclImageGetSize(), calclImageWrite() - you can get the byte stream off of that image, which is an .elf executable file.
Manually extract the first .text section from that elf file, that's the AMD_IL binary! (the second .text section is the isa microcode)
Stream kernel analyzer should be able to do this.
Might I ask how? I've been using the AMD App KernelAnalyzer and have been looking through the SDK, but I haven't seen anything with that specific functionality thus far.
Thank you,
Andrew
In the left text pane, put your IL, in the right select IL Bytestream.
Which version is this? I don't seem to have that option.
Hrmm... ok, looks like the public version of SKA doesn't have it. GPU Shader Analyzer should also have the ability to do it.
I'm not seeing the option in the public version in the GPU Shader Analyzer either.
Is the assembly function perhaps in one of the dlls these products ship with? A few of the exports I am seeing looks useful, but I haven't done any actual analysis on them to determine if they are what I need yet.
This is not an officially supported one, but I bet Kernel Analyzer does it the same way.
Look for calcl.h in the SDK include directory.
calclCompile() - you can compile an executable image with this.
calclImageGetSize(), calclImageWrite() - you can get the byte stream off of that image, which is an .elf executable file.
Manually extract the first .text section from that elf file, that's the AMD_IL binary! (the second .text section is the isa microcode)
What elf reader are you using to view this file? It doesn't seem gnu elfdump or readelf can manage it (but it does certainly appear to be an elf).
Neither I've found a suitable .elf utility.