Skip to content

Commit fd6d948

Browse files
committed
update cl_intel_device_attribute_queries for CPU devices
1 parent e3495a6 commit fd6d948

1 file changed

Lines changed: 28 additions & 9 deletions

File tree

extensions/cl_intel_device_attribute_query.asciidoc

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Ben Ashbaugh, Intel (ben 'dot' ashbaugh 'at' intel 'dot' com)
3838

3939
// spell-checker: disable
4040
Ben Ashbaugh, Intel +
41+
Chunyang Dai, Intel +
4142
Maciej Dziuban, Intel +
4243
Rafik Saliev, Intel
4344
// spell-checker: enable
@@ -53,7 +54,7 @@ Shipping
5354
== Version
5455

5556
Built On: {docdate} +
56-
Version: 1.0.0
57+
Version: 1.0.1
5758

5859
== Dependencies
5960

@@ -77,7 +78,7 @@ Additional queries may be added in subsequent versions of the extension:
7778

7879
[source]
7980
----
80-
/* For GPU devices, version 1.0.0: */
81+
/* For GPU and CPU devices, version 1.0.0: */
8182
8283
#define CL_DEVICE_IP_VERSION_INTEL 0x4250
8384
#define CL_DEVICE_ID_INTEL 0x4251
@@ -128,27 +129,44 @@ The device queries described in the Device Queries table should return the same
128129
| `cl_version`
129130
| The IP version for the device.
130131
The meaning of this version is implementation-defined, but newer devices should have a higher version than older devices.
132+
133+
For Intel GPU devices, please refer to https://github.com/intel/compute-runtime/blob/master/third_party/aot_config_headers/platforms.h[this header file], which describes what this query returns for each device.
134+
131135
| {CL_DEVICE_ID_INTEL}
132136
| `cl_uint`
133-
| A unique device identifier for the OpenCL device.
137+
| A unique identifier for the device.
138+
139+
For Intel GPU devices, the returned value contains the PCI device ID in the low 16 bits and the upper 16 bits set to zero.
140+
141+
For Intel CPU devices, the returned value contains the CPUID model, family, and stepping information, as returned in `EAX` when `CPUID` executes with `EAX` equal to one.
134142

135-
If the implementation is driven primarily by a PCI device with a PCI device ID, the low 16 bits of the device identifier must contain that PCI device ID, and the remaining bits must be set to zero.
136-
Otherwise, the choice of what to return may be dictated by operating system or platform policies - but should uniquely identify both the device version and any major configuration options (for example, core count in the case of multi-core devices).
137143
| {CL_DEVICE_NUM_SLICES_INTEL}
138144
| `cl_uint`
139-
| The number of slices in the device.
145+
| For Intel GPU devices, returns the number of slices in the device.
140146
A slice is a collection of sub-slices.
147+
148+
For Intel CPU devices, returns the number of NUMA nodes.
149+
141150
| {CL_DEVICE_NUM_SUB_SLICES_PER_SLICE_INTEL}
142151
| `cl_uint`
143-
| The maximum number of sub-slices in one slice.
152+
| For Intel GPU devices, returns the maximum number of sub-slices in one slice.
144153
A sub-slice is a collection of execution units (EUs), fixed-function units, and caches.
154+
155+
For Intel CPU devices, unconditionally returns one.
156+
145157
| {CL_DEVICE_NUM_EUS_PER_SUB_SLICE_INTEL}
146158
| `cl_uint`
147-
| The maximum number of execution units (EUs) in one sub-slice.
159+
| For Intel GPU devices, returns the maximum number of execution units (EUs) in one sub-slice.
148160
An execution unit is a multi-threaded processor that runs OpenCL kernels.
161+
162+
For Intel CPU devices, returns the number of physical cores per NUMA node.
163+
149164
| {CL_DEVICE_NUM_THREADS_PER_EU_INTEL}
150165
| `cl_uint`
151-
| The maximum number of threads that may be simultaneously resident on one execution unit (EU).
166+
| For Intel GPU devices, returns the maximum number of threads that may be simultaneously resident on one execution unit (EU).
167+
168+
For Intel CPU devices, returns the maximum number of number of threads per core.
169+
152170
| {CL_DEVICE_FEATURE_CAPABILITIES_INTEL}
153171
| {cl_device_feature_capabilities_intel_TYPE}
154172
| Feature flags describing capabilities supported by the device.
@@ -184,6 +202,7 @@ If we decide to add it back, note that some caches are local to the device, whil
184202
|========================================
185203
|Version|Date|Author|Changes
186204
|1.0.0|2021-08-12|Ben Ashbaugh|*Initial public revision*
205+
|1.0.0|2026-03-13|Ben Ashbaugh|Added IP version documentation, added CPU information.
187206
|========================================
188207

189208

0 commit comments

Comments
 (0)