mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: cleanup L0 1.14 API definitions from ze_intel_gpu.h
Related-To: NEO-14560 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cbb6a0b992
commit
8055dece7f
@@ -175,17 +175,6 @@ typedef enum _zex_intel_queue_copy_operations_offload_hint_exp_version_t {
|
||||
ZEX_INTEL_QUEUE_COPY_OPERATIONS_OFFLOAD_HINT_EXP_VERSION_FORCE_UINT32 = 0x7fffffff
|
||||
} zex_intel_queue_copy_operations_offload_hint_exp_version_t;
|
||||
|
||||
#if ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Command queue flag for enabling copy operations offload
|
||||
///
|
||||
/// If set, try to offload copy operations to different engines. Applicable only for compute queues.
|
||||
/// This is only a hint. Driver may ignore it per append call, based on platform capabilities or internal heuristics.
|
||||
#define ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT ZE_BIT(2)
|
||||
|
||||
#endif // ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13)
|
||||
|
||||
#ifndef ZE_INTEL_GET_DRIVER_VERSION_STRING_EXP_NAME
|
||||
/// @brief Extension name for query to read the Intel Level Zero Driver Version String
|
||||
#define ZE_INTEL_GET_DRIVER_VERSION_STRING_EXP_NAME "ZE_intel_get_driver_version_string"
|
||||
@@ -581,215 +570,8 @@ typedef struct _ze_queue_priority_desc_t {
|
||||
int priority; ///< [in] priority of the queue
|
||||
} ze_queue_priority_desc_t;
|
||||
|
||||
/// @brief Get default context associated with default driver
|
||||
///
|
||||
/// @details
|
||||
/// - The application may call this function from simultaneous threads.
|
||||
/// - The implementation of this function should be lock-free.
|
||||
/// - Default context contains all devices within default driver instance
|
||||
/// @returns
|
||||
/// - Context handle associated with default driver
|
||||
ZE_APIEXPORT ze_context_handle_t ZE_APICALL zerGetDefaultContext();
|
||||
|
||||
/// @brief Get Device Identifier
|
||||
///
|
||||
/// @details
|
||||
/// - The application may call this function from simultaneous threads.
|
||||
/// - The implementation of this function should be lock-free.
|
||||
/// - Returned identifier is a 32-bit unsigned integer that is unique to the driver.
|
||||
/// - The identifier can be used then in zerTranslateIdentifierToDeviceHandle to get the device handle.
|
||||
/// @returns
|
||||
/// - 32-bit unsigned integer identifier
|
||||
ZE_APIEXPORT uint32_t ZE_APICALL zerTranslateDeviceHandleToIdentifier(ze_device_handle_t hDevice); ///< [in] handle of the device
|
||||
|
||||
/// @brief Translate Device Identifier to Device Handle from default Driver
|
||||
///
|
||||
/// @details
|
||||
/// - The application may call this function from simultaneous threads.
|
||||
/// - The implementation of this function should be lock-free.
|
||||
/// - Returned device is associated to default driver handle.
|
||||
/// @returns
|
||||
/// - device handle associated with the identifier
|
||||
ZE_APIEXPORT ze_device_handle_t ZE_APICALL zerTranslateIdentifierToDeviceHandle(uint32_t identifier); ///< [in] integer identifier of the device
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Retrieves a string describing the last error code returned by the
|
||||
/// default driver in the current thread.
|
||||
///
|
||||
/// @details
|
||||
/// - String returned is thread local.
|
||||
/// - String is only updated on calls returning an error, i.e., not on calls
|
||||
/// returning ::ZE_RESULT_SUCCESS.
|
||||
/// - String may be empty if driver considers error code is already explicit
|
||||
/// enough to describe cause.
|
||||
/// - Memory pointed to by ppString is owned by the driver.
|
||||
/// - String returned is null-terminated.
|
||||
///
|
||||
/// @returns
|
||||
/// - ::ZE_RESULT_SUCCESS
|
||||
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
|
||||
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
|
||||
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
||||
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
||||
/// + `nullptr == ppString`
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zerGetLastErrorDescription(
|
||||
const char **ppString ///< [in,out] pointer to a null-terminated array of characters describing
|
||||
///< cause of error.
|
||||
);
|
||||
|
||||
#if ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13)
|
||||
|
||||
/// @brief Get default context associated with driver
|
||||
///
|
||||
/// @details
|
||||
/// - The application may call this function from simultaneous threads.
|
||||
/// - The implementation of this function should be lock-free.
|
||||
/// - Default context contains all devices within driver instance
|
||||
/// @returns
|
||||
/// - Context handle associated with driver
|
||||
ZE_APIEXPORT ze_context_handle_t ZE_APICALL zeDriverGetDefaultContext(ze_driver_handle_t hDriver); ///> [in] handle of the driver
|
||||
|
||||
/// @brief Global device synchronization
|
||||
///
|
||||
/// @details
|
||||
/// - The application may call this function from simultaneous threads.
|
||||
/// - The implementation of this function should be lock-free.
|
||||
/// - Ensures that everything that was submitted to the device is completed.
|
||||
/// - Ensures that all submissions in all queues on device are completed.
|
||||
/// - It is not allowed to call this function while some command list are in graph capture mode.
|
||||
/// - Returns error if error is detected during execution on device.
|
||||
/// - Hangs indefinitely if GPU execution is blocked on non signaled event.
|
||||
///
|
||||
/// @returns
|
||||
/// - ::ZE_RESULT_SUCCESS
|
||||
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceSynchronize(ze_device_handle_t hDevice); ///> [in] handle of the device
|
||||
|
||||
/// @brief Append with arguments
|
||||
///
|
||||
/// @details
|
||||
/// - The application may call this function from simultaneous threads.
|
||||
/// - The implementation of this function should be lock-free.
|
||||
/// - Appends kernel to command list with arguments.
|
||||
/// - Kernel object state is updated with new arguments, as if separate zeKernelSetArgumentValue were called.
|
||||
/// - If argument is SLM (size), then SLM size in bytes for this resource is provided under pointer on specific index and its type is size_t.
|
||||
/// - If argument is an immediate type (i.e. structure, non pointer type), then values under pointer must contain full size of immediate type.
|
||||
///
|
||||
/// @returns
|
||||
/// - ::ZE_RESULT_SUCCESS
|
||||
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
|
||||
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
||||
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
||||
/// + `nullptr == hCommandList`
|
||||
/// + `nullptr == hKernel`
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
||||
/// + `nullptr == pArguments`
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_SIZE
|
||||
/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)`
|
||||
typedef struct _ze_group_size_t {
|
||||
uint32_t groupSizeX; ///< [in] local work-group size in X dimension
|
||||
uint32_t groupSizeY; ///< [in] local work-group size in Y dimension
|
||||
uint32_t groupSizeZ; ///< [in] local work-group size in Z dimension
|
||||
|
||||
} ze_group_size_t;
|
||||
|
||||
ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithArguments(
|
||||
ze_command_list_handle_t hCommandList, ///< [in] handle of the command list
|
||||
ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object
|
||||
const ze_group_count_t groupCounts, ///< [in] thread group counts
|
||||
const ze_group_size_t groupSizes, ///< [in] thread group sizes
|
||||
void **pArguments, ///< [in] kernel arguments; pointer to list where each argument represents a pointer to the argument value on specific index
|
||||
const void *pNext, ///< [in][optional] extensions
|
||||
ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion
|
||||
uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching
|
||||
ze_event_handle_t *phWaitEvents); ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Extension descriptor for cooperative kernel launch via pNext chain.
|
||||
/// @details
|
||||
/// - This structure can be passed through pNext to zeCommandListAppendLaunchKernelWithParameters
|
||||
typedef struct _ze_command_list_append_launch_kernel_param_cooperative_desc_t {
|
||||
ze_structure_type_ext_t stype; ///< [in] Type of this structure (e.g. ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC)
|
||||
const void *pNext; ///< [in][optional] Pointer to the next extension-specific structure
|
||||
ze_bool_t isCooperative; ///< [in] Indicates if the kernel should be launched as cooperative
|
||||
} ze_command_list_append_launch_kernel_param_cooperative_desc_t;
|
||||
/// @brief Append with parameters
|
||||
///
|
||||
/// @details
|
||||
/// - The application may call this function from simultaneous threads.
|
||||
/// - The implementation of this function should be lock-free.
|
||||
/// - Appends kernel to command list with additional parameters via pNext chain.
|
||||
/// - Allows passing core and extension descriptors (e.g. cooperative kernel).
|
||||
///
|
||||
/// @returns
|
||||
/// - ::ZE_RESULT_SUCCESS
|
||||
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
|
||||
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
|
||||
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
|
||||
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
|
||||
/// + `nullptr == hCommandList`
|
||||
/// + `nullptr == hKernel`
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
|
||||
/// + `nullptr == pGroupCounts`
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
|
||||
/// - ::ZE_RESULT_ERROR_INVALID_SIZE
|
||||
/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)`
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithParameters(
|
||||
ze_command_list_handle_t hCommandList, ///< [in] handle of the command list
|
||||
ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object
|
||||
const ze_group_count_t *pGroupCounts, ///< [in] thread group launch arguments
|
||||
const void *pNext, ///< [in][optional] additional parameters (pNext chain)
|
||||
ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion
|
||||
uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching
|
||||
ze_event_handle_t *phWaitEvents ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching
|
||||
);
|
||||
|
||||
#endif // ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#if ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME
|
||||
/// @brief External Memory Mapping Extension Name
|
||||
#define ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME "ZE_extension_external_memmap_sysmem"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief External Memory Mapping Extension Version(s)
|
||||
typedef enum _ze_external_memmap_sysmem_ext_version_t {
|
||||
ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 = ZE_MAKE_VERSION(1, 0), ///< version 1.0
|
||||
ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_CURRENT = ZE_MAKE_VERSION(1, 0), ///< latest known version
|
||||
ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_FORCE_UINT32 = 0x7fffffff ///< Value marking end of ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_* ENUMs
|
||||
|
||||
} ze_external_memmap_sysmem_ext_version_t;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Maps external system memory for an allocation
|
||||
///
|
||||
/// @details
|
||||
/// - This structure may be passed to ::zeMemAllocHost, via the `pNext`
|
||||
/// member of ::ze_host_mem_alloc_desc_t to map system memory for a host
|
||||
/// allocation.
|
||||
/// - The system memory pointer and size being mapped must be page aligned
|
||||
/// based on the supported page sizes on the device.
|
||||
typedef struct _ze_external_memmap_sysmem_ext_desc_t {
|
||||
ze_structure_type_ext_t stype; ///< [in] type of this structure
|
||||
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
|
||||
///< structure (i.e. contains stype and pNext).
|
||||
const void *pSystemMemory; ///< [in] system memory pointer to map; must be page-aligned.
|
||||
const uint64_t size; ///< [in] size of the system memory to map; must be page-aligned.
|
||||
|
||||
} ze_external_memmap_sysmem_ext_desc_t;
|
||||
#endif // ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME
|
||||
|
||||
#endif // ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13)
|
||||
#endif
|
||||
|
||||
@@ -21,10 +21,6 @@ using zes_structure_type_ext_t = uint32_t;
|
||||
#define ZE_STRUCTURE_TYPE_INTEL_MEDIA_COMMUNICATION_DESC static_cast<ze_structure_type_ext_t>(0x00020021)
|
||||
#define ZE_STRUCTURE_TYPE_INTEL_MEDIA_DOORBELL_HANDLE_DESC static_cast<ze_structure_type_ext_t>(0x00020022)
|
||||
#define ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES static_cast<ze_structure_type_ext_t>(0x00020023)
|
||||
#if ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13)
|
||||
#define ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC static_cast<ze_structure_type_ext_t>(0x00020036)
|
||||
#define ZE_STRUCTURE_TYPE_EXTERNAL_MEMMAP_SYSMEM_EXT_DESC static_cast<ze_structure_type_ext_t>(0x00020037)
|
||||
#endif // ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13)
|
||||
#define ZEX_STRUCTURE_TYPE_LABEL_DESCRIPTOR static_cast<ze_structure_type_ext_t>(0x00030002)
|
||||
#define ZEX_STRUCTURE_TYPE_OPERAND_DESCRIPTOR static_cast<ze_structure_type_ext_t>(0x00030003)
|
||||
#define ZEX_STRUCTURE_TYPE_VARIABLE_DESCRIPTOR static_cast<ze_structure_type_ext_t>(0x00030004)
|
||||
|
||||
Reference in New Issue
Block a user