Skip to content

Commit 42107be

Browse files
authored
Add an extension to get the kernel max group size properties. (#75)
Summary: This extension provides the user with the ability to query the maximum group size that can be used to execute the kernel on the device. The implementation uses the resource requirements of the kernel (register usage, etc.) to determine what this group size should be. Notes: - This value may vary from one kernel to another as well as one device to another. - This value will be less than or equal to `ze_device_compute_properties_t::maxTotalGroupSize`. Resolves #28 Signed-off-by: Will Damon <[email protected]>
1 parent 273a307 commit 42107be

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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_kernel_max_group_size_properties:
12+
13+
============================================
14+
Kernel Max Group Size Properties Extension
15+
============================================
16+
17+
API
18+
----
19+
20+
* Enumerations
21+
22+
23+
* ${x}_kernel_max_group_size_properties_ext_version_t
24+
25+
26+
* Structures
27+
28+
29+
* ${x}_kernel_max_group_size_properties_ext_t
30+
31+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Copyright (C) 2021-2023 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
# See YaML.md for syntax definition
7+
#
8+
--- #--------------------------------------------------------------------------
9+
type: header
10+
desc: "Intel $OneApi Level-Zero Extension for querying kernel max group size properties."
11+
version: "1.5"
12+
--- #--------------------------------------------------------------------------
13+
type: macro
14+
desc: "Kernel Max Group Size Properties Extension Name"
15+
version: "1.5"
16+
name: $X_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME
17+
value: '"$X_extension_kernel_max_group_size_properties"'
18+
--- #--------------------------------------------------------------------------
19+
type: enum
20+
desc: "Kernel Max Group Size Properties Extension Version(s)"
21+
version: "1.5"
22+
name: $x_kernel_max_group_size_properties_ext_version_t
23+
etors:
24+
- name: "1_0"
25+
value: "$X_MAKE_VERSION( 1, 0 )"
26+
desc: "version 1.0"
27+
--- #--------------------------------------------------------------------------
28+
type: struct
29+
desc: "Additional kernel max group size properties"
30+
version: "1.5"
31+
class: $xKernel
32+
name: $x_kernel_max_group_size_properties_ext_t
33+
base: $x_base_properties_t
34+
members:
35+
- type: uint32_t
36+
name: maxGroupSize
37+
desc: "[out] maximum group size that can be used to execute the kernel. This value may be less than or equal to the `maxTotalGroupSize` member of $x_device_compute_properties_t."
38+
details:
39+
- "This structure may be passed to $xKernelGetProperties, via the `pNext` member of $x_kernel_properties_t, to query additional kernel max group size properties."

0 commit comments

Comments
 (0)