Skip to content

Commit b94d5df

Browse files
committed
Update to spec 1.5.17
Signed-off-by: Brandon Yates <[email protected]>
1 parent f2286c6 commit b94d5df

24 files changed

+1007
-143
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Level zero loader changelog
22

3+
## v1.9.9
4+
* Update to spec 1.5.17
5+
* Fix for calling zeInit in zesInit path
6+
* Added readme for validation layer
7+
* Refactor of validation layer to prepare for future enhancements
8+
* Updated Contributing Document with more guidance
9+
310
## v1.9.4
411
* Add support for Level Zero spec v1.5
512
* Fix some compilation issues with windows non-vc compiler

include/ze.py

+34-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
SPDX-License-Identifier: MIT
55
66
@file ze.py
7-
@version v1.5-r1.5.8
7+
@version v1.5-r1.5.17
88
99
"""
1010
import platform
@@ -517,6 +517,7 @@ class ze_device_properties_t(Structure):
517517
("type", ze_device_type_t), ## [out] generic device type
518518
("vendorId", c_ulong), ## [out] vendor id from PCI configuration
519519
("deviceId", c_ulong), ## [out] device id from PCI configuration
520+
## Note, the device id uses little-endian format.
520521
("flags", ze_device_property_flags_t), ## [out] 0 (none) or a valid combination of ::ze_device_property_flag_t
521522
("subdeviceId", c_ulong), ## [out] sub-device id. Only valid if ::ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE
522523
## is set.
@@ -2839,6 +2840,38 @@ class ze_device_ip_version_ext_t(Structure):
28392840
## version than older devices.
28402841
]
28412842

2843+
###############################################################################
2844+
## @brief Kernel Max Group Size Properties Extension Name
2845+
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_kernel_max_group_size_properties"
2846+
2847+
###############################################################################
2848+
## @brief Kernel Max Group Size Properties Extension Version(s)
2849+
class ze_kernel_max_group_size_properties_ext_version_v(IntEnum):
2850+
_1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0
2851+
CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version
2852+
2853+
class ze_kernel_max_group_size_properties_ext_version_t(c_int):
2854+
def __str__(self):
2855+
return str(ze_kernel_max_group_size_properties_ext_version_v(self.value))
2856+
2857+
2858+
###############################################################################
2859+
## @brief Additional kernel max group size properties
2860+
##
2861+
## @details
2862+
## - This structure may be passed to ::zeKernelGetProperties, via the
2863+
## `pNext` member of ::ze_kernel_properties_t, to query additional kernel
2864+
## max group size properties.
2865+
class ze_kernel_max_group_size_properties_ext_t(Structure):
2866+
_fields_ = [
2867+
("stype", ze_structure_type_t), ## [in] type of this structure
2868+
("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific
2869+
## structure (i.e. contains sType and pNext).
2870+
("maxGroupSize", c_ulong) ## [out] maximum group size that can be used to execute the kernel. This
2871+
## value may be less than or equal to the `maxTotalGroupSize` member of
2872+
## ::ze_device_compute_properties_t.
2873+
]
2874+
28422875
###############################################################################
28432876
## @brief Sub-Allocations Properties Extension Name
28442877
ZE_SUB_ALLOCATIONS_EXP_NAME = "ZE_experimental_sub_allocations"

include/ze_api.h

+56-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*
77
* @file ze_api.h
8-
* @version v1.5-r1.5.8
8+
* @version v1.5-r1.5.17
99
*
1010
*/
1111
#ifndef _ZE_API_H
@@ -741,6 +741,10 @@ typedef struct _ze_device_memory_ext_properties_t ze_device_memory_ext_propertie
741741
/// @brief Forward-declare ze_device_ip_version_ext_t
742742
typedef struct _ze_device_ip_version_ext_t ze_device_ip_version_ext_t;
743743

744+
///////////////////////////////////////////////////////////////////////////////
745+
/// @brief Forward-declare ze_kernel_max_group_size_properties_ext_t
746+
typedef struct _ze_kernel_max_group_size_properties_ext_t ze_kernel_max_group_size_properties_ext_t;
747+
744748
///////////////////////////////////////////////////////////////////////////////
745749
/// @brief Forward-declare ze_sub_allocation_t
746750
typedef struct _ze_sub_allocation_t ze_sub_allocation_t;
@@ -1192,6 +1196,7 @@ typedef struct _ze_device_properties_t
11921196
ze_device_type_t type; ///< [out] generic device type
11931197
uint32_t vendorId; ///< [out] vendor id from PCI configuration
11941198
uint32_t deviceId; ///< [out] device id from PCI configuration
1199+
///< Note, the device id uses little-endian format.
11951200
ze_device_property_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_device_property_flag_t
11961201
uint32_t subdeviceId; ///< [out] sub-device id. Only valid if ::ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE
11971202
///< is set.
@@ -5449,14 +5454,18 @@ zeKernelGetIndirectAccess(
54495454
/// + `nullptr == hKernel`
54505455
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
54515456
/// + `nullptr == pSize`
5452-
/// + `nullptr == pString`
54535457
ZE_APIEXPORT ze_result_t ZE_APICALL
54545458
zeKernelGetSourceAttributes(
54555459
ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object
5456-
uint32_t* pSize, ///< [in,out] pointer to size of string in bytes.
5457-
char** pString ///< [in,out] pointer to null-terminated string, whose lifetime is tied to
5458-
///< the kernel object, where kernel source attributes are separated by
5459-
///< space.
5460+
uint32_t* pSize, ///< [in,out] pointer to size of string in bytes, including
5461+
///< null-terminating character.
5462+
char** pString ///< [in,out][optional] pointer to application-managed character array
5463+
///< (string data).
5464+
///< If NULL, the string length of the kernel source attributes, including
5465+
///< a null-terminating character, is returned in pSize.
5466+
///< Otherwise, pString must point to valid application memory that is
5467+
///< greater than or equal to *pSize bytes in length, and on return the
5468+
///< pointed-to string will contain a space-separated list of kernel source attributes.
54605469
);
54615470

54625471
///////////////////////////////////////////////////////////////////////////////
@@ -8482,6 +8491,47 @@ typedef struct _ze_device_ip_version_ext_t
84828491

84838492
} ze_device_ip_version_ext_t;
84848493

8494+
#if !defined(__GNUC__)
8495+
#pragma endregion
8496+
#endif
8497+
// Intel 'oneAPI' Level-Zero Extension for querying kernel max group size properties.
8498+
#if !defined(__GNUC__)
8499+
#pragma region kernelMaxGroupSizeProperties
8500+
#endif
8501+
///////////////////////////////////////////////////////////////////////////////
8502+
#ifndef ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME
8503+
/// @brief Kernel Max Group Size Properties Extension Name
8504+
#define ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME "ZE_extension_kernel_max_group_size_properties"
8505+
#endif // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME
8506+
8507+
///////////////////////////////////////////////////////////////////////////////
8508+
/// @brief Kernel Max Group Size Properties Extension Version(s)
8509+
typedef enum _ze_kernel_max_group_size_properties_ext_version_t
8510+
{
8511+
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0
8512+
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version
8513+
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff
8514+
8515+
} ze_kernel_max_group_size_properties_ext_version_t;
8516+
8517+
///////////////////////////////////////////////////////////////////////////////
8518+
/// @brief Additional kernel max group size properties
8519+
///
8520+
/// @details
8521+
/// - This structure may be passed to ::zeKernelGetProperties, via the
8522+
/// `pNext` member of ::ze_kernel_properties_t, to query additional kernel
8523+
/// max group size properties.
8524+
typedef struct _ze_kernel_max_group_size_properties_ext_t
8525+
{
8526+
ze_structure_type_t stype; ///< [in] type of this structure
8527+
void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
8528+
///< structure (i.e. contains sType and pNext).
8529+
uint32_t maxGroupSize; ///< [out] maximum group size that can be used to execute the kernel. This
8530+
///< value may be less than or equal to the `maxTotalGroupSize` member of
8531+
///< ::ze_device_compute_properties_t.
8532+
8533+
} ze_kernel_max_group_size_properties_ext_t;
8534+
84858535
#if !defined(__GNUC__)
84868536
#pragma endregion
84878537
#endif

include/ze_ddi.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*
77
* @file ze_ddi.h
8-
* @version v1.5-r1.5.8
8+
* @version v1.5-r1.5.17
99
*
1010
*/
1111
#ifndef _ZE_DDI_H

include/zes.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
SPDX-License-Identifier: MIT
55
66
@file zes.py
7-
@version v1.5-r1.5.8
7+
@version v1.5-r1.5.17
88
99
"""
1010
import platform
@@ -1513,7 +1513,7 @@ class zes_mem_bandwidth_t(Structure):
15131513
("readCounter", c_ulonglong), ## [out] Total bytes read from memory
15141514
("writeCounter", c_ulonglong), ## [out] Total bytes written to memory
15151515
("maxBandwidth", c_ulonglong), ## [out] Current maximum bandwidth in units of bytes/sec
1516-
("timestamp", c_ulonglong) ## [out] The timestamp when these measurements were sampled.
1516+
("timestamp", c_ulonglong) ## [out] The timestamp in microseconds when these measurements were sampled.
15171517
## This timestamp should only be used to calculate delta time between
15181518
## snapshots of this structure.
15191519
## Never take the delta of this timestamp with the timestamp from a
@@ -1781,7 +1781,7 @@ def __str__(self):
17811781

17821782
###############################################################################
17831783
## @brief The maximum number of categories
1784-
ZES_MAX_RAS_ERROR_CATEGORY_COUNT = 7
1784+
ZES_MAX_RAS_ERROR_CATEGORY_COUNT = 10
17851785

17861786
###############################################################################
17871787
## @brief RAS properties

include/zes_api.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*
77
* @file zes_api.h
8-
* @version v1.5-r1.5.8
8+
* @version v1.5-r1.5.17
99
*
1010
*/
1111
#ifndef _ZES_API_H
@@ -4223,7 +4223,7 @@ typedef struct _zes_mem_bandwidth_t
42234223
uint64_t readCounter; ///< [out] Total bytes read from memory
42244224
uint64_t writeCounter; ///< [out] Total bytes written to memory
42254225
uint64_t maxBandwidth; ///< [out] Current maximum bandwidth in units of bytes/sec
4226-
uint64_t timestamp; ///< [out] The timestamp when these measurements were sampled.
4226+
uint64_t timestamp; ///< [out] The timestamp in microseconds when these measurements were sampled.
42274227
///< This timestamp should only be used to calculate delta time between
42284228
///< snapshots of this structure.
42294229
///< Never take the delta of this timestamp with the timestamp from a
@@ -5050,7 +5050,7 @@ typedef enum _zes_ras_error_cat_t
50505050
///////////////////////////////////////////////////////////////////////////////
50515051
#ifndef ZES_MAX_RAS_ERROR_CATEGORY_COUNT
50525052
/// @brief The maximum number of categories
5053-
#define ZES_MAX_RAS_ERROR_CATEGORY_COUNT 7
5053+
#define ZES_MAX_RAS_ERROR_CATEGORY_COUNT 10
50545054
#endif // ZES_MAX_RAS_ERROR_CATEGORY_COUNT
50555055

50565056
///////////////////////////////////////////////////////////////////////////////

include/zes_ddi.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*
77
* @file zes_ddi.h
8-
* @version v1.5-r1.5.8
8+
* @version v1.5-r1.5.17
99
*
1010
*/
1111
#ifndef _ZES_DDI_H

0 commit comments

Comments
 (0)