Skip to content

Commit

Permalink
Update to spec 1.11 (draft)
Browse files Browse the repository at this point in the history
Signed-off-by: Lisanna Dettwyler <[email protected]>
  • Loading branch information
lisanna-dettwyler committed Oct 1, 2024
1 parent 775944d commit 53276bd
Show file tree
Hide file tree
Showing 35 changed files with 2,849 additions and 175 deletions.
12 changes: 9 additions & 3 deletions 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.10-r1.10.0
@version v1.11-r1.9.55
"""
import platform
Expand Down Expand Up @@ -1979,7 +1979,8 @@ def __str__(self):
###############################################################################
## @brief Supported physical memory creation flags
class ze_physical_mem_flags_v(IntEnum):
TBD = ZE_BIT(0) ## reserved for future use.
ALLOCATE_ON_DEVICE = ZE_BIT(0) ## [default] allocate physical device memory.
ALLOCATE_ON_HOST = ZE_BIT(1) ## Allocate physical host memory instead.

class ze_physical_mem_flags_t(c_int):
def __str__(self):
Expand All @@ -1994,7 +1995,8 @@ class ze_physical_mem_desc_t(Structure):
("pNext", c_void_p), ## [in][optional] must be null or a pointer to an extension-specific
## structure (i.e. contains stype and pNext).
("flags", ze_physical_mem_flags_t), ## [in] creation flags.
## must be 0 (default) or a valid combination of ::ze_physical_mem_flag_t.
## must be 0 (default) or a valid combination of
## ::ze_physical_mem_flag_t; default is to create physical device memory.
("size", c_size_t) ## [in] size in bytes to reserve; must be page aligned.
]

Expand Down Expand Up @@ -2257,6 +2259,10 @@ class ze_relaxed_allocation_limits_exp_desc_t(Structure):
## must be 0 (default) or a valid combination of ::ze_relaxed_allocation_limits_exp_flag_t;
]

###############################################################################
## @brief Get Kernel Binary Extension Name
ZE_GET_KERNEL_BINARY_EXP_NAME = "ZE_extension_kernel_binary_exp"

###############################################################################
## @brief Cache_Reservation Extension Name
ZE_CACHE_RESERVATION_EXT_NAME = "ZE_extension_cache_reservation"
Expand Down
36 changes: 28 additions & 8 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.10-r1.10.0
* @version v1.11-r1.9.55
*
*/
#ifndef _ZE_API_H
Expand Down Expand Up @@ -2275,13 +2275,15 @@ zeDeviceGetStatus(
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == hostTimestamp`
/// + `nullptr == deviceTimestamp`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// + The feature is not supported by the underlying platform.
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetGlobalTimestamps(
ze_device_handle_t hDevice, ///< [in] handle of the device
uint64_t* hostTimestamp, ///< [out] value of the Host's global timestamp that correlates with the
///< Device's global timestamp value
///< Device's global timestamp value.
uint64_t* deviceTimestamp ///< [out] value of the Device's global timestamp that correlates with the
///< Host's global timestamp value
///< Host's global timestamp value.
);

#if !defined(__GNUC__)
Expand Down Expand Up @@ -7250,7 +7252,8 @@ zeVirtualMemQueryPageSize(
typedef uint32_t ze_physical_mem_flags_t;
typedef enum _ze_physical_mem_flag_t
{
ZE_PHYSICAL_MEM_FLAG_TBD = ZE_BIT(0), ///< reserved for future use.
ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_DEVICE = ZE_BIT(0), ///< [default] allocate physical device memory.
ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_HOST = ZE_BIT(1), ///< Allocate physical host memory instead.
ZE_PHYSICAL_MEM_FLAG_FORCE_UINT32 = 0x7fffffff

} ze_physical_mem_flag_t;
Expand All @@ -7263,7 +7266,8 @@ typedef struct _ze_physical_mem_desc_t
const void* pNext; ///< [in][optional] must be null or a pointer to an extension-specific
///< structure (i.e. contains stype and pNext).
ze_physical_mem_flags_t flags; ///< [in] creation flags.
///< must be 0 (default) or a valid combination of ::ze_physical_mem_flag_t.
///< must be 0 (default) or a valid combination of
///< ::ze_physical_mem_flag_t; default is to create physical device memory.
size_t size; ///< [in] size in bytes to reserve; must be page aligned.

} ze_physical_mem_desc_t;
Expand All @@ -7274,7 +7278,9 @@ typedef struct _ze_physical_mem_desc_t
/// @details
/// - The application must only use the physical memory object on the
/// context for which it was created.
/// - The size must be page aligned. See ::zeVirtualMemQueryPageSize.
/// - The size must be page aligned. For host memory, the operating system
/// page size should be used. For device memory, see
/// ::zeVirtualMemQueryPageSize.
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function must be thread-safe.
///
Expand All @@ -7291,14 +7297,15 @@ typedef struct _ze_physical_mem_desc_t
/// + `nullptr == desc`
/// + `nullptr == phPhysicalMemory`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `0x1 < desc->flags`
/// + `0x3 < desc->flags`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE
/// + `0 == desc->size`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT
ZE_APIEXPORT ze_result_t ZE_APICALL
zePhysicalMemCreate(
ze_context_handle_t hContext, ///< [in] handle of the context object
ze_device_handle_t hDevice, ///< [in] handle of the device object
ze_device_handle_t hDevice, ///< [in] handle of the device object, can be `nullptr` if creating
///< physical host memory.
ze_physical_mem_desc_t* desc, ///< [in] pointer to physical memory descriptor.
ze_physical_mem_handle_t* phPhysicalMemory ///< [out] pointer to handle of physical memory object created
);
Expand Down Expand Up @@ -8014,6 +8021,19 @@ typedef struct _ze_relaxed_allocation_limits_exp_desc_t

} ze_relaxed_allocation_limits_exp_desc_t;

#if !defined(__GNUC__)
#pragma endregion
#endif
// Intel 'oneAPI' Level-Zero Extension for retrieving kernel binary program data.
#if !defined(__GNUC__)
#pragma region kernelBinary
#endif
///////////////////////////////////////////////////////////////////////////////
#ifndef ZE_GET_KERNEL_BINARY_EXP_NAME
/// @brief Get Kernel Binary Extension Name
#define ZE_GET_KERNEL_BINARY_EXP_NAME "ZE_extension_kernel_binary_exp"
#endif // ZE_GET_KERNEL_BINARY_EXP_NAME

#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.10-r1.10.0
* @version v1.11-r1.9.55
*
*/
#ifndef _ZE_DDI_H
Expand Down
Loading

0 comments on commit 53276bd

Please sign in to comment.