cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

relpats_eht
Journeyman III

IL Ascii to Bytecode Assembler

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

0 Likes
1 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)

View solution in original post

0 Likes
10 Replies

Stream kernel analyzer should be able to do this.

0 Likes

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

0 Likes

In the left text pane, put your IL, in the right select IL Bytestream.

0 Likes

Which version is this? I don't seem to have that option.

0 Likes

Hrmm... ok, looks like the public version of SKA doesn't have it. GPU Shader Analyzer should also have the ability to do it.

0 Likes

I'm not seeing the option in the public version in the GPU Shader Analyzer either.

0 Likes

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.

0 Likes

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)

0 Likes

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).

0 Likes

Neither I've found a suitable .elf utility.

0 Likes