Skip to content

Commit 7ec0905

Browse files
authored
spec changes for discovering dot product capability under device compute properties (#438)
* spec changes for dot product capability support * fixes as per review feedback
1 parent 21782de commit 7ec0905

3 files changed

Lines changed: 186 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<%
2+
import re
3+
from templates import helper as th
4+
%><%
5+
OneApi=tags['$OneApi']
6+
x=tags['$x']
7+
X=x.upper()
8+
%>
9+
:orphan:
10+
11+
.. _ZE_extension_device_compute_dotproduct_ext_properties:
12+
13+
================================================
14+
Device Compute Dot Product Capability Extension
15+
================================================
16+
17+
API
18+
----
19+
20+
* Enumerations
21+
22+
23+
* ${x}_device_compute_dotproduct_properties_ext_version_t
24+
25+
26+
* Structures
27+
28+
* ${x}_device_compute_dotproduct_ext_properties_t
29+
30+
31+
Extended Device Properties
32+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
33+
34+
User may query support for compute capabilty support on the device using the compute dot product capabilty extension supported under device compute properties(${x}_device_compute_properties_t).
35+
36+
The following psuedo-code demonstrates a sequence for obtaining extended information about the device compute dot product capability:
37+
38+
.. parsed-literal::
39+
40+
...
41+
// Discover properties on device
42+
//Driver handle ze_driver_handle_t Driverh obtained through previous call to zeInitDrivers
43+
//Obtain Device handle ze_device_handle_t Deviceh
44+
//zeDeviceGet(Driverh, 1, Deviceh);
45+
46+
ze_device_compute_properties_t devComputeProp{};
47+
${x}_device_compute_dotproduct_ext_properties_t* pDpDeviceCaps = allocate(sizeof(${x}_device_compute_dotproduct_ext_properties_t));
48+
49+
pDpDeviceCaps.stype = ZE_STRUCTURE_TYPE_DEVICE_COMPUTE_DOTPRODUCT_EXT_PROPERTIES;
50+
devComputeProp.stype = ZE_STRUCTURE_TYPE_DEVICE_COMPUTEPROPERTIES;
51+
devComputeProp.pNext = pDpDeviceCaps;
52+
53+
//obtain device and extended memory properties
54+
zeDeviceGetComputeProperties(Deviceh, &devComputeProp);
55+
...
56+
57+
58+

scripts/core/common.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,10 @@ etors:
693693
desc: $x_custom_pitch_exp_desc_t
694694
version: "1.15"
695695
value: "0x00020042"
696+
- name: DEVICE_COMPUTE_DOTPRODUCT_EXT_PROPERTIES
697+
desc: $x_device_compute_dotproduct_ext_properties_t
698+
version: "1.16"
699+
value: "0x00020043"
696700
--- #--------------------------------------------------------------------------
697701
type: enum
698702
desc: "External memory type flags"

scripts/core/device.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,130 @@ members:
293293
name: "subGroupSizes[$X_SUBGROUPSIZE_COUNT]"
294294
desc: "[out] Size group sizes supported."
295295
--- #--------------------------------------------------------------------------
296+
type: enum
297+
version: "1.16"
298+
desc: "Supported device compute dot product(dp) capability flags"
299+
class: $xDevice
300+
name: $x_device_dp_capability_flags_t
301+
etors:
302+
- name: DEVICE_NON_SYSTOLIC_DPA4_SIMD_ALL
303+
desc: "Supports vector dot product instruction."
304+
- name: DEVICE_SYSTOLIC_DPAS_SIMD8
305+
desc: "Supports sytolic dot product with 8 SIMD lanes."
306+
- name: DEVICE_SYSTOLIC_DPAS_SIMD16
307+
desc: "Supports sytolic dot product with 16 SIMD lanes."
308+
- name: DEVICE_SYSTOLIC_BDPAS_SIMD16
309+
desc: "Supports sytolic dot product with block scaling support with 16 SIMD lanes."
310+
- name: DEVICE_SYSTOLIC_DPAS_DEPTH4
311+
desc: "Supports 4 deep systolic for DPAS dot product"
312+
- name: DEVICE_SYSTOLIC_DPAS_DEPTH8
313+
desc: "Supports 8 deep systolic for DPAS dot product"
314+
- name: DEVICE_SYSTOLIC_BDPAS_DEPTH8
315+
desc: "Supports 8 deep systolic for BDPAS dot product"
316+
- name: DEVICE_SYSTOLIC_OUTPUT_MATRIX_ROWCOUNT_UPTO8
317+
desc: "Supports output matrix row count upto 8"
318+
- name: DEVICE_SYSTOLIC_OUTPUT_MATRIX_ROWCOUNT_FIXED8
319+
desc: "Restricts output matrix row count to 8"
320+
321+
--- #--------------------------------------------------------------------------
322+
type: enum
323+
version: "1.16"
324+
desc: "Supported device dot product(dp) input data types flags"
325+
class: $xDevice
326+
name: $x_device_input_data_type_flags_t
327+
etors:
328+
- name: DEVICE_INPUT_DATA_TYPE_NONE
329+
desc: "No data types available for the supported dot product operation"
330+
- name: ZE_DEVICE_INPUT_DATA_INT8_PACK4_PER_SIMD_LANE
331+
desc: "Supports int8 data type with 4 packed data elements per SIMD lane."
332+
- name: DEVICE_INPUT_DATA_INT4_PACK8_PER_SIMD_LANE
333+
desc: "Supports int4 data type with 8 packed data elements per SIMD lane."
334+
- name: DEVICE_INPUT_DATA_INT2_PACK8_PER_SIMD_LANE
335+
desc: "Supports int2 data type with 8 packed data elements per SIMD lane."
336+
- name: DEVICE_INPUT_DATA_TF32_PACK1_PER_SIMD_LANE
337+
desc: "Supports tf32 data type with 1 packed data elements per SIMD lane."
338+
- name: DEVICE_INPUT_DATA_FP16_PACK2_PER_SIMD_LANE
339+
desc: "Supports fp16 data type with 2 packed data elements per SIMD lane."
340+
- name: DEVICE_INPUT_DATA_BF16_PACK2_PER_SIMD_LANE
341+
desc: "Supports bf16 data type with 2 packed data elements per SIMD lane."
342+
- name: DEVICE_INPUT_DATA_FP8_PACK4_PER_SIMD_LANE
343+
desc: "Supports fp8 data type with 4 packed data elements per SIMD lane."
344+
- name: DEVICE_INPUT_DATA_BF8_PACK4_PER_SIMD_LANE
345+
desc: "Supports bf8 data type with 4 packed data elements per SIMD lane."
346+
- name: DEVICE_INPUT_DATA_E2M1_PACK8_PER_SIMD_LANE
347+
desc: "Supports e2m1 data type with 8 packed data elements per SIMD lane."
348+
- name: DEVICE_INPUT_DATA_E3M0_PACK8_PER_SIMD_LANE
349+
desc: "Supports e3m0 data type with 8 packed data elements per SIMD lane."
350+
- name: DEVICE_INPUT_DATA_INT8_PACK4_PER_SIMD_LANE
351+
desc: "Supports 8bit integer data type with 4 packed data elements per SIMD lane.This is exclusively for DP4V dot product support"
352+
- name: DEVICE_INPUT_DATA_SCALING_UINT8
353+
desc: "Supports uint8 data type support for scaling, exclusive to BDPAS dot product support."
354+
- name: DEVICE_INPUT_DATA_SCALING_UE5M3
355+
desc: "Supports ue5m3 data type support for scaling, exclusive to BDPAS dot product support."
356+
- name: DEVICE_INPUT_DATA_SCALING_UE4M3
357+
desc: "Supports ue4m3 data type support for scaling, exclusive to BDPAS dot product support."
358+
359+
--- #--------------------------------------------------------------------------
360+
type: enum
361+
version: "1.16"
362+
desc: "Supported device dot product(dp) output data types or accumulator data types flags"
363+
class: $xDevice
364+
name: $x_device_output_data_type_flags_t
365+
etors:
366+
- name: DEVICE_OUTPUT_DATA_INT32
367+
desc: "Supports signed and unsigned 32bit integer data type for output"
368+
- name: DEVICE_OUTPUT_DATA_FP32
369+
desc: "Supports fp32 data type for output."
370+
- name: DEVICE_OUTPUT_DATA_FP16
371+
desc: "Supports fp16 data type for output."
372+
- name: DEVICE_OUTPUT_DATA_BF16
373+
desc: "Supports bf16 data type for output."
374+
--- #--------------------------------------------------------------------------
375+
type: macro
376+
desc: "Device Compute DotProduct Property Extension Name"
377+
version: "1.16"
378+
name: $X_DEVICE_COMPUTE_DOTPRODUCT_PROPERTIES_EXT_NAME
379+
value: '"$X_extension_device_compute_dotproduct_ext_properties"'
380+
--- #--------------------------------------------------------------------------
381+
type: enum
382+
desc: "Device Compute Dot product Property Extension Version(s)"
383+
version: "1.16"
384+
name: $x_device_compute_dotproduct_properties_ext_version_t
385+
etors:
386+
- name: "1_0"
387+
value: "$X_MAKE_VERSION( 1, 0 )"
388+
desc: "version 1.0"
389+
--- #--------------------------------------------------------------------------
390+
type: struct
391+
version: "1.16"
392+
desc: "Device compute dot product capability queried using $xDeviceGetComputeProperties"
393+
class: $xDevice
394+
name: $x_device_compute_dotproduct_ext_properties_t
395+
base: $x_base_properties_t
396+
members:
397+
- type: $x_device_dp_capability_flags_t
398+
name: dp_caps
399+
desc: "[out] indicates dot product capability of the device"
400+
- type: $x_device_input_data_type_flags_t
401+
name: dpv4_input_types
402+
desc: "[out] Supported input data types when dp4v dot product capability is supported."
403+
- type: $x_device_output_data_type_flags_t
404+
name: dpv4_output_types
405+
desc: "[out] Supported output data types when dp4v dot product capability is supported."
406+
- type: $x_device_input_data_type_flags_t
407+
name: dpas_input_types
408+
desc: "[out] Supported input data types when dpas dot product capability is supported."
409+
- type: $x_device_output_data_type_flags_t
410+
name: dpas_output_types
411+
desc: "[out] Supported output data types when dpas dot product capability is supported."
412+
- type: $x_device_input_data_type_flags_t
413+
name: bdpas_input_types
414+
desc: "[out] Supported input data types when bdpas dot product capability is supported."
415+
- type: $x_device_output_data_type_flags_t
416+
name: bdpas_output_types
417+
desc: "[out] Supported output data types when bdpas dot product capability is supported."
418+
419+
--- #--------------------------------------------------------------------------
296420
type: function
297421
desc: "Retrieves compute properties of the device."
298422
class: $xDevice

0 commit comments

Comments
 (0)