cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

haizaifei
Journeyman III

Whether the OpenCL supports binary file on AMD Cards?

I got the il and isa file by profiling with APP Profiler and I modify the isa file to get the case I need. But the opencl compiler cannot compile the binary file, even the original version. I have tried some methods and add the head files in accordance with the method using for NVIDIA PTX files.

I want to know whether the OpenCL compiler supports the binary file for AMD cards, if it is, what is the method?

Many Thx.

0 Likes
1 Solution
Wenju
Elite

Hi haizaifei

I think you can use clGetProgramInfo (cl_program program,  cl_program_info param_name,  size_t param_value_size,  void *param_value, size_t *param_value_size_ret) with CL_PROGRAM_BINARIES as param_name  to get the program binaries.

It return the program binaries of all devices associated with program.   you can save those binaries as a '.clo' file  and use it  to create program by clCreateProgramWithBinary .

View solution in original post

0 Likes
5 Replies
Wenju
Elite

Hi haizaifei

I think you can use clGetProgramInfo (cl_program program,  cl_program_info param_name,  size_t param_value_size,  void *param_value, size_t *param_value_size_ret) with CL_PROGRAM_BINARIES as param_name  to get the program binaries.

It return the program binaries of all devices associated with program.   you can save those binaries as a '.clo' file  and use it  to create program by clCreateProgramWithBinary .

0 Likes

You can read the code of  AMD APP SDK Samples.There are many of such operations.

0 Likes
haizaifei
Journeyman III

Thank you very much for your kind answer.

But the binary file generated by function clGetProgramInfo is in binary code flow and I cannot modify the code.

Could it show in the form of il or assembly?

0 Likes

Use the compilation option -fbin-amdil to store the IL in the binary.

Many thanks for your answer.

But where could I add the option " -fbin-amdil "?I use Visual Studio 2008

on Windows7, and I add the option in the code like one optimization option

such as "-cl-fast-relaxed-math" but I find it does not work.

I am looking forward to your reply.

Best Regards!

在 2012年4月13日 下午10:58,MicahVillmow <developer.forums@amd.com>写道:

**

AMD Developer Forums <http://devgurus.amd.com/index.jspa>

Re: Whether the OpenCL supports binary file on AMD Cards? in OpenCL

0 Likes