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.
Solved! Go to Solution.
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 .
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 .
You can read the code of AMD APP SDK Samples.There are many of such operations.
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?
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