cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

lebron2323
Journeyman III

Is possible to compile OpenCL code for all current video cards?

I need to distribute my program, which use opencl code without opencl sources. So i need to compile it to binary and load program from binary. This is simple, but each video card compile different binary for it self. How can i avoid this, and compile my source code for different videocards, whitout having this videocards. Maybe some compiler exist, where i can set spesific video card and get binary code for it? Thanks!

0 Likes
1 Reply
nou
Exemplar

To generate binary images offline, it is necessary to access the compiler for

every device that the runtime supports, even if the device is currently not installed

on the system. When, during context creation,

CL_CONTEXT_OFFLINE_DEVICES_AMD is passed in the context properties, all

supported devices, whether online or offline, are reported and can be used to

create OpenCL binary images.

or look at SPIR specification which should be supported by Intel and AMD devices.

0 Likes