Skip to content

Commit da13664

Browse files
committed
Update script attr-> prop
Signed-off-by: JackAKirk <[email protected]>
1 parent 3171987 commit da13664

File tree

2 files changed

+61
-56
lines changed

2 files changed

+61
-56
lines changed

scripts/core/EXP-LAUNCH-ATTRIBUTES.rst

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
X=x.upper()
55
%>
66

7-
.. _experimental-launch-attributes:
7+
.. _experimental-launch-properties:
88

99
================================================================================
10-
LAUNCH Attributes
10+
LAUNCH Properties
1111
================================================================================
1212

1313
.. warning::
@@ -22,53 +22,58 @@ LAUNCH Attributes
2222

2323
Terminology
2424
--------------------------------------------------------------------------------
25-
"Launch Attribute" is used to indicate an optional kernel attribute that can
26-
be specified at the time of a kernel launch. Such attributes can be used to
27-
enable hardware specific kernel features.
25+
"Launch Properties" is used to indicate optional kernel launch properties that
26+
can be specified at the time of a kernel launch. Such properties can be used to
27+
enable hardware specific kernel launch features.
2828

2929
Motivation
3030
--------------------------------------------------------------------------------
31-
Advances in hardware sometimes require new kernel attributes. One example is
31+
Advances in hardware sometimes require new kernel properties. One example is
3232
distributed shared memory as used by Nvidia Hopper GPUs. Launching a kernel
33-
that supports distributed shared memory requires specifying a thread cluster
34-
dimension over which the shared memory is accessible. Additionally some
35-
applications require specification of kernel attributes at runtime.
36-
37-
This extension is a future-proof and portable solution that supports these two requirements.
38-
Instead of using a fixed set of kernel arguments, the approach is to introduce the
39-
`exp_launch_attribute_t` type that enables a more flexible approach.
40-
Each `exp_launch_attribute_t` instance corresponds to a specific kernel launch attribute.
41-
One new function is introduced; `urEnqueueKernelLaunchCustomExp` takes an
42-
array of `exp_launch_attribute_t` as an argument, and launches a kernel using these
43-
attributes. `urEnqueueKernelLaunchCustomExp` corresponds closely to the CUDA Driver API
33+
that supports distributed shared memory requires specifying a set of "cluster"
34+
dimensions, in units of work-groups, over which the shared memory is
35+
"distributed". Additionally some applications require specification of kernel
36+
properties at launch-time.
37+
38+
This extension is a future-proof and portable solution that supports these two
39+
requirements. Instead of using a fixed set of kernel enqueue arguments, the
40+
approach is to introduce the `exp_launch_property_t` type that enables a more
41+
extendable API.
42+
43+
Each `exp_launch_property_t` instance corresponds to a specific kernel launch
44+
property.
45+
Only one new function is introduced: `urEnqueueKernelLaunchCustomExp`.
46+
`urEnqueueKernelLaunchCustomExp` takes an array of `exp_launch_property_t` as
47+
an argument, and launches a kernel using these properties.
48+
`urEnqueueKernelLaunchCustomExp` corresponds closely to the CUDA Driver API
4449
`cuLaunchKernelEx`.
4550

46-
Many kernel properties can be supported, such as cooperative kernels. As such,
47-
eventually this extension should be able to replace the cooperative kernels
48-
UR extension.
51+
Many kernel lauch properties can be supported, such as cooperative kernel
52+
launches. As such, eventually this extension should be able to replace the
53+
cooperative kernels Unified-Runtime extension.
4954

5055
API
5156
--------------------------------------------------------------------------------
5257

5358
Macros
5459
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5560

56-
* ${X}_LAUNCH_ATTRIBUTES_EXTENSION_STRING_EXP
61+
* ${X}_LAUNCH_PROPERTIES_EXTENSION_STRING_EXP
5762

5863
Enums
5964
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6065

61-
* ${x}_exp_launch_attribute_id_t
66+
* ${x}_exp_launch_property_id_t
6267

6368
Unions
6469
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6570

66-
* ${x}_exp_launch_attribute_value_t
71+
* ${x}_exp_launch_property_value_t
6772

6873
Structs
6974
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7075

71-
* ${x}_exp_launch_attribute_t
76+
* ${x}_exp_launch_property_t
7277

7378
Functions
7479
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -79,7 +84,7 @@ Support
7984
--------------------------------------------------------------------------------
8085

8186
Adapters which support this experimental feature *must* return the valid string
82-
defined in ``${X}_LAUNCH_ATTRIBUTES_EXTENSION_STRING_EXP`` as one of the options from
87+
defined in ``${X}_LAUNCH_PROPERTIES_EXTENSION_STRING_EXP`` as one of the options from
8388
${x}DeviceGetInfo when querying for ${X}_DEVICE_INFO_EXTENSIONS.
8489

8590
Changelog

scripts/core/exp-launch-attributes.yml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,68 +9,68 @@
99
#
1010
--- #--------------------------------------------------------------------------
1111
type: header
12-
desc: "Intel $OneApi Unified Runtime Experimental APIs for (kernel) Launch Attributes"
12+
desc: "Intel $OneApi Unified Runtime Experimental APIs for (kernel) Launch Properties"
1313
ordinal: "99"
1414
--- #--------------------------------------------------------------------------
1515
type: macro
16-
desc: "The extension string that defines support for the Launch Attributes extension, which is returned when querying device extensions."
17-
name: $X_LAUNCH_ATTRIBUTES_EXTENSION_STRING_EXP
18-
value: "\"$x_exp_launch_attributes\""
16+
desc: "The extension string that defines support for the Launch Properties extension, which is returned when querying device extensions."
17+
name: $X_LAUNCH_PROPERTIES_EXTENSION_STRING_EXP
18+
value: "\"$x_exp_launch_properties\""
1919
--- #--------------------------------------------------------------------------
2020
type: enum
21-
desc: "Specifies a launch attribute id"
22-
name: $x_exp_launch_attribute_id_t
21+
desc: "Specifies a launch property id"
22+
name: $x_exp_launch_property_id_t
2323
analogue:
2424
- "**CUlaunchAttributeID**"
2525
etors:
2626
- name: IGNORE
27-
desc: "the attribute has no effect"
27+
desc: "The property has no effect"
2828
- name: COOPERATIVE
29-
desc: "whether to launch a cooperative kernel"
29+
desc: "Whether to launch a cooperative kernel"
3030
- name: CLUSTER_DIMENSION
31-
desc: "cluster dimensions"
31+
desc: "work-group cluster dimensions"
3232
--- #--------------------------------------------------------------------------
3333
type: union
34-
desc: "Specifies a launch attribute value"
35-
name: $x_exp_launch_attribute_value_t
36-
tag: $x_exp_launch_attribute_id_t
34+
desc: "Specifies a launch property value"
35+
name: $x_exp_launch_property_value_t
36+
tag: $x_exp_launch_property_id_t
3737
analogue:
3838
- "**CUlaunchAttributeValue**"
3939
members:
4040
- type: uint32_t[3]
4141
name: clusterDim
42-
desc: "[in] cluster dimensions (x, y, z)"
43-
tag: $X_EXP_LAUNCH_ATTRIBUTE_ID_CLUSTER_DIMENSION
42+
desc: "[in] dimensions of the cluster (units of work-group) (x, y, z). Each value must be a divisor of the corresponding global work-size dimension (in units of work-group)."
43+
tag: $X_EXP_LAUNCH_PROPERTY_ID_CLUSTER_DIMENSION
4444
- type: int
4545
name: cooperative
4646
desc: "[in] non-zero value indicates a cooperative kernel"
47-
tag: $X_EXP_LAUNCH_ATTRIBUTE_ID_COOPERATIVE
47+
tag: $X_EXP_LAUNCH_PROPERTY_ID_COOPERATIVE
4848
--- #--------------------------------------------------------------------------
4949
type: struct
50-
desc: "Kernel launch attribute"
51-
name: $x_exp_launch_attribute_t
50+
desc: "Kernel launch property"
51+
name: $x_exp_launch_property_t
5252
analogue:
5353
- "**cuLaunchAttribute**"
5454
members:
55-
- type: $x_exp_launch_attribute_id_t
55+
- type: $x_exp_launch_property_id_t
5656
name: id
57-
desc: "[in] Launch attribute id"
58-
init: $X_EXP_LAUNCH_ATTRIBUTE_ID_IGNORE
59-
- type: $x_exp_launch_attribute_value_t
57+
desc: "[in] launch property id"
58+
init: $X_EXP_LAUNCH_PROPERTY_ID_IGNORE
59+
- type: $x_exp_launch_property_value_t
6060
name: value
61-
desc: "[in][tagged_by(id)] Launch attribute value"
61+
desc: "[in][tagged_by(id)] launch property value"
6262
init: nullptr
6363
--- #--------------------------------------------------------------------------
6464
type: function
65-
desc: "Launch kernel with custom Launch attributes"
65+
desc: "Launch kernel with custom launch properties"
6666
class: $xEnqueue
6767
name: KernelLaunchCustomExp
6868
ordinal: "0"
6969
analogue:
7070
- "**cuLaunchKernelEx**"
7171
details:
72-
- "Launches the kernel using the specified launch attributes"
73-
- "If numAttrsInLaunchAttrList == 0 then a regular kernel launch is used: `urEnqueueKernelLaunch`"
72+
- "Launches the kernel using the specified launch properties"
73+
- "If numPropsInLaunchPropList == 0 then a regular kernel launch is used: `urEnqueueKernelLaunch`"
7474
- "Consult the appropriate adapter driver documentation for details of adapter specific behavior and native error codes that may be returned."
7575
params:
7676
- type: $x_queue_handle_t
@@ -89,11 +89,11 @@ params:
8989
name: pLocalWorkSize
9090
desc: "[in][optional] pointer to an array of workDim unsigned values that specify the number of local work-items forming a work-group that will execute the kernel function. If nullptr, the runtime implementation will choose the work-group size."
9191
- type: uint32_t
92-
name: numAttrsInLaunchAttrList
93-
desc: "[in] size of the launch attr list"
94-
- type: const $x_exp_launch_attribute_t*
95-
name: launchAttrList
96-
desc: "[in][range(0, numAttrsInLaunchAttrList)] pointer to a list of launch attributes"
92+
name: numPropsInLaunchPropList
93+
desc: "[in] size of the launch prop list"
94+
- type: const $x_exp_launch_property_t*
95+
name: launchPropList
96+
desc: "[in][range(0, numPropsInLaunchPropList)] pointer to a list of launch properties"
9797
- type: uint32_t
9898
name: numEventsInWaitList
9999
desc: "[in] size of the event wait list"
@@ -113,7 +113,7 @@ returns:
113113
- "NULL == hKernel"
114114
- $X_RESULT_ERROR_INVALID_NULL_POINTER:
115115
- "NULL == pGlobalWorkSize"
116-
- "numAttrsInLaunchAttrList != 0 && launchAttrList == NULL"
116+
- "numPropsInLaunchpropList != 0 && launchPropList == NULL"
117117
- $X_RESULT_ERROR_INVALID_QUEUE
118118
- $X_RESULT_ERROR_INVALID_KERNEL
119119
- $X_RESULT_ERROR_INVALID_EVENT

0 commit comments

Comments
 (0)