Skip to content

Commit a9f1b9f

Browse files
committed
clean up a few more descriptions of custom devices
1 parent e3495a6 commit a9f1b9f

4 files changed

Lines changed: 32 additions & 51 deletions

File tree

api/glossary.asciidoc

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,11 @@ Buffer Object ::
8383
--
8484

8585
Built-in Kernel ::
86-
A _built-in kernel_ is a _kernel_ that is executed on an OpenCL _device_
87-
or _custom device_ by fixed-function hardware or in firmware.
88-
_Applications_ can query the _built-in kernels_ supported by a _device_
89-
or _custom device_.
90-
A _program object_ can only contain _kernels_ written in OpenCL C or
91-
_built-in kernels_ but not both.
92-
See also _Kernel_ and _Program_.
86+
A _built-in kernel_ is a _kernel_ that is provided by an OpenCL
87+
implementation.
88+
A _built-in kernel_ is enqueued for execution like other _kernels_, but may
89+
execute on specialized hardware that is unavailable to non-built-in kernels.
90+
_Applications_ can query the _built-in kernels_ supported by a _device_.
9391

9492
Child kernel ::
9593
See _Device-side enqueue_.
@@ -171,17 +169,13 @@ Converged control flow ::
171169
See _Control flow_.
172170

173171
Custom Device ::
174-
An OpenCL _device_ that fully implements the OpenCL Runtime but does not
175-
support _programs_ written in OpenCL C.
176-
A custom device may be specialized non-programmable hardware that is
177-
very power efficient and performant for directed tasks or hardware with
178-
limited programmable capabilities such as specialized DSPs.
179-
Custom devices are not OpenCL conformant.
180-
Custom devices may support an online compiler.
181-
Programs for custom devices can be created using the OpenCL runtime APIs
182-
that allow OpenCL programs to be created from source (if an online
183-
compiler is supported) and/or binary, or from _built-in kernels_
184-
supported by the _device_.
172+
A _custom device_ is a specialized _device_ that supports a subset of the
173+
OpenCL runtime APIs for directed tasks but is not OpenCL conformant.
174+
A _custom device_ must implement all of the OpenCL runtime APIs, but may
175+
return implementation-defined error codes for unsupported functionality.
176+
_Custom devices_ may support an online compiler.
177+
When an online compiler is not available, OpenCL _programs_ may be created
178+
from binaries or for _built-in kernels_ supported by the device.
185179
See also _Device_.
186180

187181
Data Parallel Programming Model ::

api/opencl_architecture.asciidoc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,8 @@ A device may expose special purpose functionality as a _built-in kernel_.
8787
The platform provides APIs for enumerating and invoking the built-in
8888
kernels offered by a device, but otherwise does not define their
8989
construction or semantics.
90-
A _custom device_ supports only built-in kernels, and cannot be programmed
91-
via a kernel language.
9290

93-
NOTE: Built-in kernels and custom devices are <<unified-spec, missing before>>
94-
version 1.2.
91+
NOTE: Built-in kernels are <<unified-spec, missing before>> version 1.2.
9592

9693
All device types support the OpenCL execution model, the OpenCL memory
9794
model, and the APIs used in OpenCL to manage devices.
@@ -685,10 +682,9 @@ The OpenCL execution model supports three types of kernels:
685682
* *Built-in kernels* are tied to particular device and are not built at
686683
runtime from source code in a program object.
687684
The common use of built in kernels is to expose fixed-function hardware
688-
or firmware associated with a particular OpenCL device or custom device.
689-
The semantics of a built-in kernel may be defined outside of OpenCL and
685+
or firmware associated with a particular OpenCL device.
686+
The semantics of a built-in kernel are defined outside of OpenCL and
690687
hence are implementation-defined.
691-
Note: Built-in kernels are <<unified-spec, missing before>> version 1.2.
692688

693689

694690
All three types of kernels are manipulated through the OpenCL command-queues

api/opencl_platform_layer.asciidoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,10 @@ include::{generated}/api/version-notes/CL_DEVICE_TYPE_ACCELERATOR.asciidoc[]
446446
| {CL_DEVICE_TYPE_CUSTOM_anchor}
447447

448448
include::{generated}/api/version-notes/CL_DEVICE_TYPE_CUSTOM.asciidoc[]
449-
| Specialized devices that implement some of the OpenCL runtime APIs but
450-
do not support all of the required OpenCL functionality.
449+
| Specialized devices that support a subset of the OpenCL runtime APIs for
450+
directed tasks but is not OpenCL conformant.
451+
A custom device must implement all of the OpenCL runtime APIs, but may
452+
return implementation-defined error codes for unsupported functionality.
451453

452454
| {CL_DEVICE_TYPE_DEFAULT_anchor}
453455

api/opencl_runtime_layer.asciidoc

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9145,20 +9145,12 @@ include::{generated}/api/version-notes/clCreateProgramWithSource.asciidoc[]
91459145
* _errcode_ret_ will return an appropriate error code.
91469146
If _errcode_ret_ is `NULL`, no error code is returned.
91479147

9148-
The source code specified by _strings_ will be loaded into the program
9149-
object.
9150-
91519148
The devices associated with the program object are the devices associated
91529149
with _context_.
9153-
The source code specified by _strings_ is either an OpenCL C program source,
9154-
header or implementation-defined source for custom devices that support an
9155-
online compiler.
9156-
OpenCL {cpp} is not supported as an online-compiled kernel language through
9157-
this interface.
9158-
ifdef::cl_ext_cxx_for_opencl[]
9159-
If the {cl_ext_cxx_for_opencl_EXT} extension is supported, the source code
9160-
specified by _strings_ may also be a C++ for OpenCL program source or header.
9161-
endif::cl_ext_cxx_for_opencl[]
9150+
9151+
The source code specified by _strings_ are loaded into the program object.
9152+
The source languages supported for _strings_ are defined by device queries such
9153+
as {CL_DEVICE_OPENCL_C_ALL_VERSIONS}.
91629154

91639155
// refError
91649156

@@ -11501,22 +11493,19 @@ include::{generated}/api/version-notes/clGetKernelWorkGroupInfo.asciidoc[]
1150111493

1150211494
include::{generated}/api/version-notes/CL_KERNEL_GLOBAL_WORK_SIZE.asciidoc[]
1150311495
| {size_t_TYPE}[3]
11504-
| This provides a mechanism for the application to query the maximum
11505-
global size that can be used to execute a kernel (i.e. the
11506-
_global_work_size_ argument to {clEnqueueNDRangeKernel}) on a custom
11507-
device given by _device_ or a built-in kernel on an OpenCL device
11508-
given by _device_.
11509-
11510-
If _device_ is not a custom device and _kernel_ is not a built-in
11511-
kernel, {clGetKernelWorkGroupInfo} returns the error
11512-
{CL_INVALID_VALUE}.
11496+
| Provides a mechanism for the application to query the maximum
11497+
global size that can be used to execute a built-in kernel on a
11498+
specific device given by _device_.
11499+
11500+
If _kernel_ is not a built-in kernel, querying
11501+
{CL_KERNEL_GLOBAL_WORK_SIZE) returns the error {CL_INVALID_VALUE}.
1151311502
| {CL_KERNEL_WORK_GROUP_SIZE_anchor}
1151411503

1151511504
include::{generated}/api/version-notes/CL_KERNEL_WORK_GROUP_SIZE.asciidoc[]
1151611505
| {size_t_TYPE}
11517-
| This provides a mechanism for the application to query the maximum
11506+
| Provides a mechanism for the application to query the maximum
1151811507
work-group size that can be used to execute the kernel on a specific
11519-
device given by device.
11508+
device given by _device_.
1152011509
The OpenCL implementation uses the resource requirements of the
1152111510
kernel (register usage etc.) to determine what this work-group size
1152211511
should be.
@@ -11587,7 +11576,7 @@ Otherwise, it returns one of the following errors:
1158711576
<<kernel-workgroup-info-table, Kernel Object Device Queries>> table
1158811577
and _param_value_ is not `NULL`.
1158911578
* {CL_INVALID_VALUE} if _param_name_ is {CL_KERNEL_GLOBAL_WORK_SIZE} and
11590-
_device_ is not a custom device and _kernel_ is not a built-in kernel.
11579+
_kernel_ is not a built-in kernel.
1159111580
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
1159211581
by the OpenCL implementation on the device.
1159311582
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources

0 commit comments

Comments
 (0)