| // Copyright 2017-2020 The Khronos Group. This work is licensed under a |
| // Creative Commons Attribution 4.0 International License; see |
| // http://creativecommons.org/licenses/by/4.0/ |
| |
| = Associated OpenCL specification |
| |
| |
| [[spirv-il]] |
| == SPIR-V Intermediate Language |
| |
| OpenCL 2.1 and 2.2 require support for the SPIR-V intermediate |
| language that allows offline compilation to a binary |
| format that may be consumed by the {clCreateProgramWithIL} interface. |
| |
| The OpenCL specification includes a specification for the SPIR-V |
| intermediate language as a cross-platform input language. |
| In addition, platform vendors may support their own IL if this is |
| appropriate. |
| The OpenCL runtime will return a list of supported IL versions using the |
| {CL_DEVICE_IL_VERSION} or {CL_DEVICE_ILS_WITH_VERSION} parameter to |
| the {clGetDeviceInfo} query. |
| |
| |
| [[opencl-extensions]] |
| == Extensions to OpenCL |
| |
| In addition to the specification of core features, OpenCL provides a number |
| of extensions to the API, kernel language or intermediate representation. |
| These features are defined in the OpenCL extension specification document. |
| |
| Extensions defined against earlier versions of the OpenCL specifications, |
| whether the API or language specification, are defined in the matching |
| versions of the extension specification document. |
| |
| [[opencl-c-kernel-language]] |
| == The OpenCL C Kernel Language |
| |
| The OpenCL C kernel language is not defined in the OpenCL unified |
| specification. |
| The OpenCL C kernel languages are instead defined in the OpenCL 1.0, |
| OpenCL 1.1, OpenCL 1.2, OpenCL C 2.0 Kernel Language, and OpenCL C 3.0 |
| Kernel Language specifications. |
| When OpenCL devices support one or more versions of the OpenCL C |
| kernel language (see {CL_DEVICE_OPENCL_C_VERSION} and |
| {CL_DEVICE_OPENCL_C_ALL_VERSIONS}), |
| OpenCL program objects may be created by passing OpenCL C source |
| strings to {clCreateProgramWithSource}. |