OpenCL™规范 6.相关的OpenCL规范

6. Associated OpenCL specification

6.相关的OpenCL规范

6.1. SPIR-V Intermediate Language

6.1. SPIR-V中间语言

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.

​OpenCL 2.1和2.2需要支持SPIR-V中间语言,该语言允许离线编译为clCreateProgramWithIL接口可能使用的二进制格式。

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规范包括SPIR-V中间语言作为跨平台输入语言的规范。此外,如果合适,平台供应商可以支持自己的IL。OpenCL运行时将使用clGetDeviceInfo查询的CL_DEVICE_IL_VERSION或CL_DEVICE_ILS_WITH_VERSION参数返回支持的IL版本列表。

6.2. Extensions to OpenCL

6.2. 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.

除了核心特性的规范外,OpenCL还为API、内核语言或中间表示提供了许多扩展。这些特性在OpenCL扩展规范文档中进行了定义。

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规范定义的扩展,无论是API还是语言规范,都在扩展规范文档的匹配版本中定义。

6.3. The OpenCL C Kernel Language

6.3. OpenCL C内核语言

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.

​OpenCL统一规范中没有定义OpenCL C内核语言。OpenCL C内核语言是在OpenCL 1.0、OpenCL 1.1、OpenCL 1.2、OpenCL C 2.0内核语言和OpenCL C 3.0内核语言规范中定义的。当OpenCL设备支持一个或多个版本的OpenCL C内核语言时(请参阅CL_DEVICE_OPENCL_C_VERSION和CL_DEVICE_OPENCL_C_ALL_VERSIONS),可以通过将OpenCL C源字符串传递给clCreateProgramWithSource来创建OpenCL程序对象。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值