cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

openclstudent
Journeyman III

Disassembly in .isa intermediate file from clBuildProgram cut short

Jump to solution

Hello,

I am currently using  AMD Drivers to obtain the disassembly for OpenCL programs targeting the Southern Islands ISA. I call clBuildProgram with the "-save-temps" compiler flag to save the intermediate .isa file generated by the driver compiler. I have encountered a problem where when I attempt to read the disassembly of a long kernel, the .isa file cuts the assembly dump short. It seems as though there is a finite size to the string containing the assembly dump, because the assembly is cut short mid-instruction in some cases.

Is there any way to obtain the complete Southern Islands assembly dump for OpenCL kernels? Is there a compiler flag that can be passed in clBuildProgram that may dictate the length of the assembly dump to be generated?

I have attached a sample .isa intermediate file that I generated, in which the assembly is cut off.

0 Likes
1 Solution

Accepted Solutions
rouellet
Staff
Staff

Re: Disassembly in .isa intermediate file from clBuildProgram cut short

Jump to solution

The line termination bug was recently fixed.

The process of fixes making their way to released drivers is somewhat opaque to me.

I'm pretty sure you will see this behavior improved in the drivers that come out in early 2013.

It is possible that drivers will have this fix earlier.

R.

View solution in original post

0 Likes
3 Replies
rouellet
Staff
Staff

Re: Disassembly in .isa intermediate file from clBuildProgram cut short

Jump to solution

I think that you are confused about the problem here.

The ISA files created for SI do have problems with inconsistent line termination.

The SC_SRCShader Dump section has carriage-return new-line termination (CRLF a.k.a. control-M control-J).

The other sections have just line-feed termination (a.k.a LF a.k.a. control-J).

Otherwise your file looks fine to me.

I think that this has a bug report already.

But in case it doesn't I will file another report.

In the mean time, could you try using a better editor?

Notepad pretty much requires CRLF line endings to work right.

Without the CR's it will display everything as one really long line.

Emacs and notepad deal with this better.

The Visual C++/DevStudio editor is pretty awesome with this -- drag & drop your file there & it will give you a dialog:

  The line endings in the following file are not consistent.  Do you want to normalize the line endings?  <filename>

  Line ending:

  [Drop down box with 5 choices]

           [Yes] [No]

I'll see if I can attach a cleaned up version of your file...

rouellet
Staff
Staff

Re: Disassembly in .isa intermediate file from clBuildProgram cut short

Jump to solution

I've attached a cleaned up version of your output file.

0 Likes
rouellet
Staff
Staff

Re: Disassembly in .isa intermediate file from clBuildProgram cut short

Jump to solution

The line termination bug was recently fixed.

The process of fixes making their way to released drivers is somewhat opaque to me.

I'm pretty sure you will see this behavior improved in the drivers that come out in early 2013.

It is possible that drivers will have this fix earlier.

R.

View solution in original post

0 Likes