Quantcast
Channel: AMD Developer Forums: Message List - 13.4 -save-temp compiler option doesn't do anything
Viewing all articles
Browse latest Browse all 12

Re: 13.4 -save-temp compiler option doesn't do anything

$
0
0

You can upload anything with clCreateProgram* including: - OpenCL source, .elf with only IL section in it.

Then you can use clBuildProgram with the flags -fno-bin-source -fno-bin-llvmir -fno-bin-amdil -fbin-exe to generate an Executable only .elf. At this point if you use -save-temps, it will generate the opencl, il and isa files.

 

After that you have an .elf that only contains the executable section. If you load it with clCreateProgram, and then ask clBuildProgram with -save-temps, it will not generate the .isa disasm (13.4 fails, 12.10 works fine).

 

The example files I linked:

test_il.elf -> it's an elf containing a small amd_il code, 10 lines of code.

test.elf -> whis is what clCreateProgramWithBinary() and clBuildProgram() compiled from test_il.elf with the -no-source -no-llvmir -no-amdil -yes-exe flags.

 

Both .elfs are tested and running prefectly but on 13.4 but only the amd_il elf can be disassembled (even there is no isa in it). The isa-only elf cannot be disassembled.

 

Important! These test.elf is for 13.4 and incompatible with previous catalysts!!!

On 12.10 everything I'm talking about is working good, don't even need to check it.


So the simplest test sequence is: OpenCL test program -> compile to executable only .elf -> save the .elf -> load it with a new clCreateProgram/clBuildProgram with -save-temps -> NO .ISA file generated on cat 13.4.


Thank you!


Viewing all articles
Browse latest Browse all 12

Trending Articles