Skip to content

Commit

Permalink
Add experimental extension to query mem properties of sorting kernels
Browse files Browse the repository at this point in the history
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
  • Loading branch information
Jaime Arteaga committed May 11, 2023
1 parent 4181430 commit fedcc08
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
34 changes: 34 additions & 0 deletions scripts/core/EXT_Exp_GroupAlgorithmMemory.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<%
import re
from templates import helper as th
%><%
OneApi=tags['$OneApi']
x=tags['$x']
X=x.upper()
%>
:orphan:

.. _ZE_experimental_device_group_algorithm_memory_properties:

========================================================
Group Algorithm Memory Properties Experimental Extension
========================================================

API
----

* Enumerations

* ${x}_device_group_algorithm_memory_properties_exp_version_t
* ${x}_group_algorithm_type_exp_t
* ${x}_group_algorithm_memory_scope_exp_t

* Structures


* ${x}_device_group_algorithm_memory_exp_properties_t

* Functions


* ${x}DeviceGetGroupAlgorithmMemoryPropertiesExp
4 changes: 4 additions & 0 deletions scripts/core/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,10 @@ etors:
desc: $x_memory_sub_allocations_exp_properties_t
version: "1.5"
value: "0x0002000D"
- name: DEVICE_GROUP_ALGORITHM_MEMORY_EXP_PROPERTIES
desc: $x_device_group_algorithm_memory_exp_properties_t
version: "1.6"
value: "0x0002000E"
- name: COMMAND_GRAPH_EXP_DESC
desc: $x_command_graph_exp_desc_t
version: "2.0"
Expand Down
93 changes: 93 additions & 0 deletions scripts/core/groupalgorithmmemory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#
# Copyright (C) 2023 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
# See YaML.md for syntax definition
#
--- #--------------------------------------------------------------------------
type: header
desc: "Intel $OneApi Level-Zero Extension APIs for Querying Memory Properties of Group Algorithms"
version: "1.6"
--- #--------------------------------------------------------------------------
type: macro
desc: "Group Algorithm Memory Properties Extension Name"
version: "1.6"
name: $X_DEVICE_GROUP_ALGORITHM_MEMORY_PROPERTIES_EXP_NAME
value: '"$X_experimental_device_group_algorithm_memory_properties"'
--- #--------------------------------------------------------------------------
type: enum
desc: "Group Algorithm Memory Properties version(s)"
version: "1.6"
name: $x_device_group_algorithm_memory_properties_exp_version_t
etors:
- name: "1_0"
value: "$X_MAKE_VERSION( 1, 0 )"
desc: "version 1.0"
--- #--------------------------------------------------------------------------
type: enum
desc: "Supported group algorithms to be used with $xDeviceGetGroupAlgorithmMemoryPropertiesExp"
version: "1.6"
class: $xDevice
name: $x_group_algorithm_type_exp_t
etors:
- name: SORT
value: "0"
desc: "sorting algorithm"
- name: SCAN
desc: "scan algorithm"
- name: REDUCE
desc: "reduce algorithm"
--- #--------------------------------------------------------------------------
type: enum
desc: "Supported scopes in group algorithms to be used with $xDeviceGetGroupAlgorithmMemoryPropertiesExp"
version: "1.6"
class: $xDevice
name: $x_group_algorithm_memory_scope_exp_t
etors:
- name: SUBGROUP
value: "0"
desc: "memory scope limited to subgroup"
- name: WORKGROUP
desc: "memory scope limited to workgroup"
--- #--------------------------------------------------------------------------
type: struct
desc: "Device Group Algorithm Memory Properties"
version: "1.6"
class: $xDevice
name: $x_device_group_algorithm_memory_exp_properties_t
base: $x_base_properties_t
members:
- type: $x_group_algorithm_type_exp_t
name: "algorithm"
desc: "[in] Type of group algorithm"
- type: $x_group_algorithm_memory_scope_exp_t
name: "memoryScope"
desc: "[in] Memory scope of group algorithm"
- type: size_t*
name: "pGlobalMemorySize"
desc: "[out][optional] pointer to global memory size"
- type: size_t*
name: "pSharedLocalMemorySize"
desc: "[out][optional] pointer to shared local memory size"
details:
- "This structure must be passed to $xDeviceGetGroupAlgorithmMemoryPropertiesExp to obtain the memory properties of a group algorithm."
--- #--------------------------------------------------------------------------
type: function
desc: "Retrieves memory properties of a group algorithm for the target device."
class: $xDevice
version: "1.6"
name: GetGroupAlgorithmMemoryPropertiesExp
details:
- "The application may call this function from simultaneous threads."
- "The implementation of this function should be lock-free."
params:
- type: $x_device_handle_t
name: hDevice
desc: "[in] handle of the device"
- type: size_t
name: size
desc: "[in] number of elements to process"
- type: "$x_device_group_algorithm_memory_exp_properties_t*"
name: pGroupAlgorithmMemoryProperties
desc: "[in,out] query result for group algorithm memory properties"

0 comments on commit fedcc08

Please sign in to comment.