Skip to content

Commit

Permalink
Update to spec 1.5.17
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
  • Loading branch information
bmyates committed Mar 3, 2023
1 parent f2286c6 commit b94d5df
Show file tree
Hide file tree
Showing 24 changed files with 1,007 additions and 143 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Level zero loader changelog

## v1.9.9
* Update to spec 1.5.17
* Fix for calling zeInit in zesInit path
* Added readme for validation layer
* Refactor of validation layer to prepare for future enhancements
* Updated Contributing Document with more guidance

## v1.9.4
* Add support for Level Zero spec v1.5
* Fix some compilation issues with windows non-vc compiler
Expand Down
35 changes: 34 additions & 1 deletion include/ze.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SPDX-License-Identifier: MIT
@file ze.py
@version v1.5-r1.5.8
@version v1.5-r1.5.17
"""
import platform
Expand Down Expand Up @@ -517,6 +517,7 @@ class ze_device_properties_t(Structure):
("type", ze_device_type_t), ## [out] generic device type
("vendorId", c_ulong), ## [out] vendor id from PCI configuration
("deviceId", c_ulong), ## [out] device id from PCI configuration
## Note, the device id uses little-endian format.
("flags", ze_device_property_flags_t), ## [out] 0 (none) or a valid combination of ::ze_device_property_flag_t
("subdeviceId", c_ulong), ## [out] sub-device id. Only valid if ::ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE
## is set.
Expand Down Expand Up @@ -2839,6 +2840,38 @@ class ze_device_ip_version_ext_t(Structure):
## version than older devices.
]

###############################################################################
## @brief Kernel Max Group Size Properties Extension Name
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_kernel_max_group_size_properties"

###############################################################################
## @brief Kernel Max Group Size Properties Extension Version(s)
class ze_kernel_max_group_size_properties_ext_version_v(IntEnum):
_1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0
CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version

class ze_kernel_max_group_size_properties_ext_version_t(c_int):
def __str__(self):
return str(ze_kernel_max_group_size_properties_ext_version_v(self.value))


###############################################################################
## @brief Additional kernel max group size properties
##
## @details
## - This structure may be passed to ::zeKernelGetProperties, via the
## `pNext` member of ::ze_kernel_properties_t, to query additional kernel
## max group size properties.
class ze_kernel_max_group_size_properties_ext_t(Structure):
_fields_ = [
("stype", ze_structure_type_t), ## [in] type of this structure
("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific
## structure (i.e. contains sType and pNext).
("maxGroupSize", c_ulong) ## [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
## ::ze_device_compute_properties_t.
]

###############################################################################
## @brief Sub-Allocations Properties Extension Name
ZE_SUB_ALLOCATIONS_EXP_NAME = "ZE_experimental_sub_allocations"
Expand Down
62 changes: 56 additions & 6 deletions include/ze_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file ze_api.h
* @version v1.5-r1.5.8
* @version v1.5-r1.5.17
*
*/
#ifndef _ZE_API_H
Expand Down Expand Up @@ -741,6 +741,10 @@ typedef struct _ze_device_memory_ext_properties_t ze_device_memory_ext_propertie
/// @brief Forward-declare ze_device_ip_version_ext_t
typedef struct _ze_device_ip_version_ext_t ze_device_ip_version_ext_t;

///////////////////////////////////////////////////////////////////////////////
/// @brief Forward-declare ze_kernel_max_group_size_properties_ext_t
typedef struct _ze_kernel_max_group_size_properties_ext_t ze_kernel_max_group_size_properties_ext_t;

///////////////////////////////////////////////////////////////////////////////
/// @brief Forward-declare ze_sub_allocation_t
typedef struct _ze_sub_allocation_t ze_sub_allocation_t;
Expand Down Expand Up @@ -1192,6 +1196,7 @@ typedef struct _ze_device_properties_t
ze_device_type_t type; ///< [out] generic device type
uint32_t vendorId; ///< [out] vendor id from PCI configuration
uint32_t deviceId; ///< [out] device id from PCI configuration
///< Note, the device id uses little-endian format.
ze_device_property_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_device_property_flag_t
uint32_t subdeviceId; ///< [out] sub-device id. Only valid if ::ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE
///< is set.
Expand Down Expand Up @@ -5449,14 +5454,18 @@ zeKernelGetIndirectAccess(
/// + `nullptr == hKernel`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pSize`
/// + `nullptr == pString`
ZE_APIEXPORT ze_result_t ZE_APICALL
zeKernelGetSourceAttributes(
ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object
uint32_t* pSize, ///< [in,out] pointer to size of string in bytes.
char** pString ///< [in,out] pointer to null-terminated string, whose lifetime is tied to
///< the kernel object, where kernel source attributes are separated by
///< space.
uint32_t* pSize, ///< [in,out] pointer to size of string in bytes, including
///< null-terminating character.
char** pString ///< [in,out][optional] pointer to application-managed character array
///< (string data).
///< If NULL, the string length of the kernel source attributes, including
///< a null-terminating character, is returned in pSize.
///< Otherwise, pString must point to valid application memory that is
///< greater than or equal to *pSize bytes in length, and on return the
///< pointed-to string will contain a space-separated list of kernel source attributes.
);

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -8482,6 +8491,47 @@ typedef struct _ze_device_ip_version_ext_t

} ze_device_ip_version_ext_t;

#if !defined(__GNUC__)
#pragma endregion
#endif
// Intel 'oneAPI' Level-Zero Extension for querying kernel max group size properties.
#if !defined(__GNUC__)
#pragma region kernelMaxGroupSizeProperties
#endif
///////////////////////////////////////////////////////////////////////////////
#ifndef ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME
/// @brief Kernel Max Group Size Properties Extension Name
#define ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME "ZE_extension_kernel_max_group_size_properties"
#endif // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME

///////////////////////////////////////////////////////////////////////////////
/// @brief Kernel Max Group Size Properties Extension Version(s)
typedef enum _ze_kernel_max_group_size_properties_ext_version_t
{
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version
ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff

} ze_kernel_max_group_size_properties_ext_version_t;

///////////////////////////////////////////////////////////////////////////////
/// @brief Additional kernel max group size properties
///
/// @details
/// - This structure may be passed to ::zeKernelGetProperties, via the
/// `pNext` member of ::ze_kernel_properties_t, to query additional kernel
/// max group size properties.
typedef struct _ze_kernel_max_group_size_properties_ext_t
{
ze_structure_type_t stype; ///< [in] type of this structure
void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains sType and pNext).
uint32_t maxGroupSize; ///< [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
///< ::ze_device_compute_properties_t.

} ze_kernel_max_group_size_properties_ext_t;

#if !defined(__GNUC__)
#pragma endregion
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/ze_ddi.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file ze_ddi.h
* @version v1.5-r1.5.8
* @version v1.5-r1.5.17
*
*/
#ifndef _ZE_DDI_H
Expand Down
6 changes: 3 additions & 3 deletions include/zes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SPDX-License-Identifier: MIT
@file zes.py
@version v1.5-r1.5.8
@version v1.5-r1.5.17
"""
import platform
Expand Down Expand Up @@ -1513,7 +1513,7 @@ class zes_mem_bandwidth_t(Structure):
("readCounter", c_ulonglong), ## [out] Total bytes read from memory
("writeCounter", c_ulonglong), ## [out] Total bytes written to memory
("maxBandwidth", c_ulonglong), ## [out] Current maximum bandwidth in units of bytes/sec
("timestamp", c_ulonglong) ## [out] The timestamp when these measurements were sampled.
("timestamp", c_ulonglong) ## [out] The timestamp in microseconds when these measurements were sampled.
## This timestamp should only be used to calculate delta time between
## snapshots of this structure.
## Never take the delta of this timestamp with the timestamp from a
Expand Down Expand Up @@ -1781,7 +1781,7 @@ def __str__(self):

###############################################################################
## @brief The maximum number of categories
ZES_MAX_RAS_ERROR_CATEGORY_COUNT = 7
ZES_MAX_RAS_ERROR_CATEGORY_COUNT = 10

###############################################################################
## @brief RAS properties
Expand Down
6 changes: 3 additions & 3 deletions include/zes_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file zes_api.h
* @version v1.5-r1.5.8
* @version v1.5-r1.5.17
*
*/
#ifndef _ZES_API_H
Expand Down Expand Up @@ -4223,7 +4223,7 @@ typedef struct _zes_mem_bandwidth_t
uint64_t readCounter; ///< [out] Total bytes read from memory
uint64_t writeCounter; ///< [out] Total bytes written to memory
uint64_t maxBandwidth; ///< [out] Current maximum bandwidth in units of bytes/sec
uint64_t timestamp; ///< [out] The timestamp when these measurements were sampled.
uint64_t timestamp; ///< [out] The timestamp in microseconds when these measurements were sampled.
///< This timestamp should only be used to calculate delta time between
///< snapshots of this structure.
///< Never take the delta of this timestamp with the timestamp from a
Expand Down Expand Up @@ -5050,7 +5050,7 @@ typedef enum _zes_ras_error_cat_t
///////////////////////////////////////////////////////////////////////////////
#ifndef ZES_MAX_RAS_ERROR_CATEGORY_COUNT
/// @brief The maximum number of categories
#define ZES_MAX_RAS_ERROR_CATEGORY_COUNT 7
#define ZES_MAX_RAS_ERROR_CATEGORY_COUNT 10
#endif // ZES_MAX_RAS_ERROR_CATEGORY_COUNT

///////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion include/zes_ddi.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file zes_ddi.h
* @version v1.5-r1.5.8
* @version v1.5-r1.5.17
*
*/
#ifndef _ZES_DDI_H
Expand Down
Loading

0 comments on commit b94d5df

Please # to comment.