cl_khr_spir

Extension adds support to create an OpenCL program object from a Standard Portable Intermediate Representation (SPIR) instance.

#pragma OPENCL EXTENSION cl_khr_spir : enable

Description

This extension adds support to create an OpenCL program object from a Standard Portable Intermediate Representation (SPIR) instance. SPIR is a vendor neutral non-source representation for OpenCL C programs that has since been superceded by the SPIR-V standard.

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.

This extension adds changes to the following:

Specification

OpenCL Specification

Also see

EXTENSION, clCreateProgramWithBinary, clBuildProgram, clCompileProgram, clGetDeviceInfo, clGetProgramBuildInfo, clGetKernelArgInfo

Copyright © 2007-2015 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.