1 Reply Latest reply on Mar 24, 2014 8:50 AM by nou

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

    lebron2323

      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!

        • Re: Is possible to compile OpenCL code for all current video cards?
          nou

          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.