Extension adds support to create an OpenCL program object from a Standard Portable Intermediate Representation (SPIR) instance.
Additions to section 5.8.1 –Creating Program Objects:
This extension adds the device property
CL_DEVICE_SPIR_VERSIONS
to Table 4.3 (see
clGetDeviceInfo).
Additions to section 5.8.1 –Creating Program Objects:
clCreateProgramWithBinary can be used to load a SPIR binary. Once a program object has been created from a SPIR binary, clBuildProgram can be called to build a program executable or clCompileProgram can be called to compile the SPIR binary.
Modify the CL_PROGRAM_BINARY_TYPE
entry in table 5.14
(see clGetProgramBuildInfo)
to add a potential value CL_PROGRAM_BINARY_TYPE_INTERMEDIATE
.
Additions to section 5.8.4 –Compiler Options.:
The compile option -x spir
must be specified
to indicate that the binary is in SPIR format, and
the compile option -spir-std
must be used
to specify the version of the SPIR specification that
describes the format and meaning of the binary. For
example, if the binary is as described in
SPIR version 1.2, then -spir-std=1.2
must
be specified. Failing to specify these compile options
may result in implementation defined behavior.