PDA

View Full Version : Add support for multiple binary formats and query mecanism



oscarbg
03-16-2013, 11:01 AM
Hi,
while adding a suggestion to Intel OCL forums one think come into mind:
now with SPIR support coming and multiple IHVs offering support for inline propietary assembly in OpenCL stack seems OCL should need to be extended to expose multiple binary formats in platforms that support it..
Could be extended similar as OGL supports see ARB_get_program_binary
extend APIs providing thinks querying avaiable formats,selecting a binary format, or getting current binary format:
enum binaryFormat
NUM_PROGRAM_BINARY_FORMATS 0x87FE PROGRAM_BINARY_FORMATS 0x87FF
and then each vendor can have
CL_BINARY_FORMAT_SPIR
CL_BINARY_FORMAT_PTX
CL_BINARY_FORMAT_AMDIL
CL_BINARY_FORMAT_HSAIL
CL_BINARY_FORMAT_IGIL

each one provides utility for a diferent reason:

*one would be SPIR for portable binaries

*another propietary binary for fastest building (i.e. pure device binaries)

*last one vendor text assembly format (for tweaking and using advanced ISA of each arch while functionality gets standarized in OCL) (NV:PTX AMD:AMDIL Intel:IGIL)

Hope we could be have that in OCL 2.0..