From 9a0a52d46df16b05652f964affdcab71b58a5d12 Mon Sep 17 00:00:00 2001 From: Aleksandra Nizio Date: Tue, 19 Aug 2025 15:09:02 +0000 Subject: [PATCH] feature: Add new API to append kernel with support to additional parameters Related-To: NEO-15565,GSD-10660 Signed-off-by: Aleksandra Nizio --- .../api/core/ze_cmdlist_api_entrypoints.h | 33 ++++++++++++++- level_zero/core/source/cmdlist/cmdlist.h | 7 ++++ .../cmdlist/cmdlist_additional_args.cpp | 13 +++++- level_zero/core/source/cmdlist/cmdlist_hw.h | 8 ++++ level_zero/core/source/cmdlist/cmdlist_hw.inl | 32 ++++++++++++-- .../driver/extension_function_address.cpp | 1 + .../black_box_tests/common/zello_common.cpp | 4 +- .../black_box_tests/common/zello_common.h | 2 +- .../core/test/unit_tests/mocks/mock_cmdlist.h | 6 +++ .../sources/cmdlist/test_cmdlist_6.cpp | 17 ++++++++ .../unit_tests/sources/driver/test_driver.cpp | 4 ++ .../graph/captured_apis/graph_captured_apis.h | 1 + level_zero/include/level_zero/ze_intel_gpu.h | 42 ++++++++++++++++++- level_zero/include/level_zero/ze_stypes.h | 3 ++ 14 files changed, 163 insertions(+), 10 deletions(-) diff --git a/level_zero/api/core/ze_cmdlist_api_entrypoints.h b/level_zero/api/core/ze_cmdlist_api_entrypoints.h index 852f707b89..3f2a3097ae 100644 --- a/level_zero/api/core/ze_cmdlist_api_entrypoints.h +++ b/level_zero/api/core/ze_cmdlist_api_entrypoints.h @@ -173,6 +173,25 @@ ze_result_t zeCommandListAppendLaunchKernelWithArguments( return L0::CommandList::fromHandle(hCommandList)->appendLaunchKernelWithArguments(hKernel, groupCounts, groupSizes, pArguments, pNext, hSignalEvent, numWaitEvents, phWaitEvents); } +ze_result_t zeCommandListAppendLaunchKernelWithParameters( + ze_command_list_handle_t hCommandList, + ze_kernel_handle_t hKernel, + const ze_group_count_t *pGroupCounts, + const void *pNext, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { + if (!hCommandList) { + return ZE_RESULT_ERROR_INVALID_NULL_HANDLE; + } + auto cmdList = L0::CommandList::fromHandle(hCommandList); + auto ret = cmdList->capture(hCommandList, hKernel, pGroupCounts, pNext, hSignalEvent, numWaitEvents, phWaitEvents); + if (ret != ZE_RESULT_ERROR_NOT_AVAILABLE) { + return ret; + } + + return cmdList->appendLaunchKernelWithParameters(hKernel, pGroupCounts, pNext, hSignalEvent, numWaitEvents, phWaitEvents); +} } // namespace L0 extern "C" { @@ -322,4 +341,16 @@ ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithArguments( ze_event_handle_t *phWaitEvents) { return L0::zeCommandListAppendLaunchKernelWithArguments(hCommandList, hKernel, groupCounts, groupSizes, pArguments, pNext, hSignalEvent, numWaitEvents, phWaitEvents); } -} // extern "C" +ZE_APIEXPORT ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithParameters( + ze_command_list_handle_t hCommandList, + ze_kernel_handle_t hKernel, + const ze_group_count_t *pGroupCounts, + const void *pNext, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { + + return L0::zeCommandListAppendLaunchKernelWithParameters( + hCommandList, hKernel, pGroupCounts, pNext, hSignalEvent, numWaitEvents, phWaitEvents); +} +} // extern "C" \ No newline at end of file diff --git a/level_zero/core/source/cmdlist/cmdlist.h b/level_zero/core/source/cmdlist/cmdlist.h index 1bf1419955..1f6afdf0fc 100644 --- a/level_zero/core/source/cmdlist/cmdlist.h +++ b/level_zero/core/source/cmdlist/cmdlist.h @@ -139,6 +139,13 @@ struct CommandList : _ze_command_list_handle_t { uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) = 0; + virtual ze_result_t appendLaunchKernelWithParameters(ze_kernel_handle_t hKernel, + const ze_group_count_t *pGroupCounts, + const void *pNext, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) = 0; + virtual ze_result_t appendMemAdvise(ze_device_handle_t hDevice, const void *ptr, size_t size, ze_memory_advice_t advice) = 0; virtual ze_result_t executeMemAdvise(ze_device_handle_t hDevice, diff --git a/level_zero/core/source/cmdlist/cmdlist_additional_args.cpp b/level_zero/core/source/cmdlist/cmdlist_additional_args.cpp index e584c0cc8b..9d30466f37 100644 --- a/level_zero/core/source/cmdlist/cmdlist_additional_args.cpp +++ b/level_zero/core/source/cmdlist/cmdlist_additional_args.cpp @@ -8,10 +8,10 @@ #include "shared/source/command_container/command_encoder.h" #include "level_zero/core/source/cmdlist/cmdlist.h" +#include "level_zero/core/source/cmdlist/cmdlist_launch_params.h" +#include "level_zero/ze_intel_gpu.h" namespace L0 { -struct CmdListKernelLaunchParams; - void CommandList::setAdditionalDispatchKernelArgsFromLaunchParams(NEO::EncodeDispatchKernelArgs &dispatchKernelArgs, const CmdListKernelLaunchParams &launchParams) const { } @@ -23,6 +23,15 @@ ze_result_t CommandList::validateLaunchParams(const Kernel &kernel, const CmdLis } ze_result_t CommandList::obtainLaunchParamsFromExtensions(const ze_base_desc_t *desc, CmdListKernelLaunchParams &launchParams, ze_kernel_handle_t kernelHandle) const { + while (desc) { + if (desc->stype == ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC) { + auto cooperativeDesc = reinterpret_cast(desc); + launchParams.isCooperative = cooperativeDesc->isCooperative; + } else { + return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE; + } + desc = reinterpret_cast(desc->pNext); + } return ZE_RESULT_SUCCESS; } diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.h b/level_zero/core/source/cmdlist/cmdlist_hw.h index 07ed07c076..1632125226 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw.h @@ -139,6 +139,14 @@ struct CommandListCoreFamily : public CommandListImp { ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) override; + + ze_result_t appendLaunchKernelWithParameters(ze_kernel_handle_t hKernel, + const ze_group_count_t *pGroupCounts, + const void *pNext, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) override; + ze_result_t appendMemAdvise(ze_device_handle_t hDevice, const void *ptr, size_t size, ze_memory_advice_t advice) override; diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 2a9e0b9149..408a27f775 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -635,17 +635,43 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithArgument return result; } } + return this->appendLaunchKernelWithParameters(hKernel, &groupCounts, pNext, hSignalEvent, numWaitEvents, phWaitEvents); +} + +template +ze_result_t CommandListCoreFamily::appendLaunchKernelWithParameters( + ze_kernel_handle_t hKernel, + const ze_group_count_t *pGroupCounts, + const void *pNext, + ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents) { + + if (hKernel == nullptr) { + return ZE_RESULT_ERROR_INVALID_NULL_HANDLE; + } + + auto kernel = L0::Kernel::fromHandle(hKernel); + if (kernel == nullptr) { + return ZE_RESULT_ERROR_INVALID_NULL_HANDLE; + } + + if (pGroupCounts == nullptr) { + return ZE_RESULT_ERROR_INVALID_NULL_POINTER; + } + if ((phWaitEvents == nullptr) && (numWaitEvents > 0)) { + return ZE_RESULT_ERROR_INVALID_SIZE; + } L0::CmdListKernelLaunchParams launchParams = {}; launchParams.skipInOrderNonWalkerSignaling = this->skipInOrderNonWalkerSignalingAllowed(hSignalEvent); - result = this->obtainLaunchParamsFromExtensions(reinterpret_cast(pNext), launchParams, hKernel); - + auto result = this->obtainLaunchParamsFromExtensions(reinterpret_cast(pNext), launchParams, hKernel); if (result != ZE_RESULT_SUCCESS) { return result; } - return this->appendLaunchKernel(hKernel, groupCounts, hSignalEvent, numWaitEvents, phWaitEvents, launchParams); + return this->appendLaunchKernel(hKernel, *pGroupCounts, hSignalEvent, numWaitEvents, phWaitEvents, launchParams); } template diff --git a/level_zero/core/source/driver/extension_function_address.cpp b/level_zero/core/source/driver/extension_function_address.cpp index a9fb20e972..47bd5440cb 100644 --- a/level_zero/core/source/driver/extension_function_address.cpp +++ b/level_zero/core/source/driver/extension_function_address.cpp @@ -40,6 +40,7 @@ void *ExtensionFunctionAddressHelper::getExtensionFunctionAddress(const std::str RETURN_FUNC_PTR_IF_EXIST(zeDeviceGetPriorityLevels); RETURN_FUNC_PTR_IF_EXIST(zeCommandListAppendLaunchKernelWithArguments); + RETURN_FUNC_PTR_IF_EXIST(zeCommandListAppendLaunchKernelWithParameters); RETURN_FUNC_PTR_IF_EXIST(zexKernelGetBaseAddress); RETURN_FUNC_PTR_IF_EXIST(zexKernelGetArgumentSize); diff --git a/level_zero/core/test/black_box_tests/common/zello_common.cpp b/level_zero/core/test/black_box_tests/common/zello_common.cpp index 98cd31ad31..7a428fe4a6 100644 --- a/level_zero/core/test/black_box_tests/common/zello_common.cpp +++ b/level_zero/core/test/black_box_tests/common/zello_common.cpp @@ -22,10 +22,10 @@ namespace LevelZeroBlackBoxTests { decltype(&zerGetDefaultContext) zerGetDefaultContextFunc = nullptr; decltype(&zeDeviceSynchronize) zeDeviceSynchronizeFunc = nullptr; decltype(&zeCommandListAppendLaunchKernelWithArguments) zeCommandListAppendLaunchKernelWithArgumentsFunc = nullptr; +decltype(&zeCommandListAppendLaunchKernelWithParameters) zeCommandListAppendLaunchKernelWithParametersFunc = nullptr; decltype(&zerTranslateIdentifierToDeviceHandle) zerTranslateIdentifierToDeviceHandleFunc = nullptr; decltype(&zerTranslateDeviceHandleToIdentifier) zerTranslateDeviceHandleToIdentifierFunc = nullptr; decltype(&zerGetLastErrorDescription) zerGetLastErrorDescriptionFunc = nullptr; - struct LoadedDriverExtensions { std::vector extensions; bool loaded = false; @@ -461,6 +461,8 @@ std::vector zelloInitContextAndGetDevices(ze_context_handle_ SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zerGetDefaultContext", reinterpret_cast(&zerGetDefaultContextFunc))); SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zeDeviceSynchronize", reinterpret_cast(&zeDeviceSynchronizeFunc))); SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zeCommandListAppendLaunchKernelWithArguments", reinterpret_cast(&zeCommandListAppendLaunchKernelWithArgumentsFunc))); + SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zeCommandListAppendLaunchKernelWithParameters", reinterpret_cast(&zeCommandListAppendLaunchKernelWithParametersFunc))); + SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zerTranslateIdentifierToDeviceHandle", reinterpret_cast(&zerTranslateIdentifierToDeviceHandleFunc))); SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zerTranslateDeviceHandleToIdentifier", reinterpret_cast(&zerTranslateDeviceHandleToIdentifierFunc))); SUCCESS_OR_TERMINATE(zeDriverGetExtensionFunctionAddress(driverHandle, "zerGetLastErrorDescription", reinterpret_cast(&zerGetLastErrorDescriptionFunc))); diff --git a/level_zero/core/test/black_box_tests/common/zello_common.h b/level_zero/core/test/black_box_tests/common/zello_common.h index 3116ae38c0..2dd65ee435 100644 --- a/level_zero/core/test/black_box_tests/common/zello_common.h +++ b/level_zero/core/test/black_box_tests/common/zello_common.h @@ -25,10 +25,10 @@ inline void validate(ResulT result, const char *message); extern decltype(&zerGetDefaultContext) zerGetDefaultContextFunc; extern decltype(&zeDeviceSynchronize) zeDeviceSynchronizeFunc; extern decltype(&zeCommandListAppendLaunchKernelWithArguments) zeCommandListAppendLaunchKernelWithArgumentsFunc; +extern decltype(&zeCommandListAppendLaunchKernelWithParameters) zeCommandListAppendLaunchKernelWithParametersFunc; extern decltype(&zerTranslateIdentifierToDeviceHandle) zerTranslateIdentifierToDeviceHandleFunc; extern decltype(&zerTranslateDeviceHandleToIdentifier) zerTranslateDeviceHandleToIdentifierFunc; extern decltype(&zerGetLastErrorDescription) zerGetLastErrorDescriptionFunc; - } // namespace LevelZeroBlackBoxTests #define SUCCESS_OR_TERMINATE(CALL) LevelZeroBlackBoxTests::validate(CALL, #CALL) diff --git a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h index aadd835ce8..01065697e2 100644 --- a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h +++ b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h @@ -395,6 +395,12 @@ struct Mock : public CommandList { ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)); + ADDMETHOD_NOBASE(appendLaunchKernelWithParameters, ze_result_t, ZE_RESULT_SUCCESS, + (ze_kernel_handle_t hKernel, + const ze_group_count_t *pGroupCounts, + const void *pNext, ze_event_handle_t hSignalEvent, + uint32_t numWaitEvents, + ze_event_handle_t *phWaitEvents)); ADDMETHOD_NOBASE(appendSoftwareTag, ze_result_t, ZE_RESULT_SUCCESS, (const char *data)); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp index 067aa38b79..8f498e4975 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp @@ -445,6 +445,23 @@ HWTEST_F(CommandListTest, givenComputeCommandListAnd2dRegionWhenMemoryCopyRegion EXPECT_TRUE(commandList->usedKernelLaunchParams.isDestinationAllocationInSystemMemory); } +HWTEST_F(CommandListTest, givenCooperativeDescriptorWithTrueValueWhenObtainLaunchParamsFromExtensionsIsCalledThenIsCooperativeIsSet) { + L0::CmdListKernelLaunchParams launchParams = {}; + ze_command_list_append_launch_kernel_param_cooperative_desc_t cooperativeDesc = {}; + cooperativeDesc.stype = static_cast(ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC); + cooperativeDesc.pNext = nullptr; + cooperativeDesc.isCooperative = true; + + ze_base_desc_t *desc = reinterpret_cast(&cooperativeDesc); + + auto commandList = std::make_unique>>(); + commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u); + + ze_result_t result = commandList->obtainLaunchParamsFromExtensions(desc, launchParams, nullptr); + EXPECT_EQ(ZE_RESULT_SUCCESS, result); + EXPECT_TRUE(launchParams.isCooperative); +} + HWTEST_F(CommandListTest, givenComputeCommandListAnd2dRegionWhenMemoryCopyRegionInUsmHostAllocationCalledThenBuiltinFlagAndDestinationAllocSystemIsSet) { auto commandList = std::make_unique>>(); commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u); diff --git a/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp b/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp index 63b86b54bd..9f382aaca7 100644 --- a/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp +++ b/level_zero/core/test/unit_tests/sources/driver/test_driver.cpp @@ -1277,6 +1277,7 @@ TEST_F(DriverExperimentalApiTest, whenRetrievingApiFunctionThenExpectProperPoint decltype(&zeDeviceSynchronize) expectedZeDeviceSynchronize = zeDeviceSynchronize; decltype(&zeCommandListAppendLaunchKernelWithArguments) expectedZeCommandListAppendLaunchKernelWithArguments = zeCommandListAppendLaunchKernelWithArguments; + decltype(&zeCommandListAppendLaunchKernelWithParameters) expectedZeCommandListAppendLaunchKernelWithParameters = zeCommandListAppendLaunchKernelWithParameters; decltype(&zexKernelGetBaseAddress) expectedKernelGetBaseAddress = L0::zexKernelGetBaseAddress; decltype(&zeIntelGetDriverVersionString) expectedIntelGetDriverVersionString = zeIntelGetDriverVersionString; @@ -1322,6 +1323,9 @@ TEST_F(DriverExperimentalApiTest, whenRetrievingApiFunctionThenExpectProperPoint EXPECT_EQ(ZE_RESULT_SUCCESS, zeDriverGetExtensionFunctionAddress(driverHandle, "zeCommandListAppendLaunchKernelWithArguments", &funPtr)); EXPECT_EQ(expectedZeCommandListAppendLaunchKernelWithArguments, reinterpret_cast(funPtr)); + EXPECT_EQ(ZE_RESULT_SUCCESS, zeDriverGetExtensionFunctionAddress(driverHandle, "zeCommandListAppendLaunchKernelWithParameters", &funPtr)); + EXPECT_EQ(expectedZeCommandListAppendLaunchKernelWithParameters, reinterpret_cast(funPtr)); + EXPECT_EQ(ZE_RESULT_SUCCESS, zeDriverGetExtensionFunctionAddress(driverHandle, "zexKernelGetBaseAddress", &funPtr)); EXPECT_EQ(expectedKernelGetBaseAddress, reinterpret_cast(funPtr)); diff --git a/level_zero/experimental/source/graph/captured_apis/graph_captured_apis.h b/level_zero/experimental/source/graph/captured_apis/graph_captured_apis.h index 2eb3ab9d23..28c566177a 100644 --- a/level_zero/experimental/source/graph/captured_apis/graph_captured_apis.h +++ b/level_zero/experimental/source/graph/captured_apis/graph_captured_apis.h @@ -41,6 +41,7 @@ struct Event; RR_CAPTURED_API(zeCommandListAppendLaunchKernel) \ RR_CAPTURED_API(zeCommandListAppendLaunchCooperativeKernel) \ RR_CAPTURED_API(zeCommandListAppendLaunchKernelIndirect) \ + RR_CAPTURED_API(zeCommandListAppendLaunchKernelWithParameters) \ RR_CAPTURED_API(zeCommandListAppendLaunchMultipleKernelsIndirect) \ RR_CAPTURED_API(zeCommandListAppendSignalExternalSemaphoreExt) \ RR_CAPTURED_API(zeCommandListAppendWaitExternalSemaphoreExt) \ diff --git a/level_zero/include/level_zero/ze_intel_gpu.h b/level_zero/include/level_zero/ze_intel_gpu.h index d66fa88104..37a53a0cf2 100644 --- a/level_zero/include/level_zero/ze_intel_gpu.h +++ b/level_zero/include/level_zero/ze_intel_gpu.h @@ -608,6 +608,46 @@ ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithArguments( 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 +); /////////////////////////////////////////////////////////////////////////////// /// @brief Retrieves a string describing the last error code returned by the /// default driver in the current thread. @@ -665,7 +705,5 @@ const ze_command_queue_desc_t defaultCommandQueueDesc = { ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS, // mode ZE_COMMAND_QUEUE_PRIORITY_NORMAL // priority }; - #endif // ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13) - #endif diff --git a/level_zero/include/level_zero/ze_stypes.h b/level_zero/include/level_zero/ze_stypes.h index 035deeacf9..09b1f02fb3 100644 --- a/level_zero/include/level_zero/ze_stypes.h +++ b/level_zero/include/level_zero/ze_stypes.h @@ -21,6 +21,9 @@ using zes_structure_type_ext_t = uint32_t; #define ZE_STRUCTURE_TYPE_INTEL_MEDIA_COMMUNICATION_DESC static_cast(0x00020021) #define ZE_STRUCTURE_TYPE_INTEL_MEDIA_DOORBELL_HANDLE_DESC static_cast(0x00020022) #define ZE_STRUCTURE_TYPE_INTEL_DEVICE_MEDIA_EXP_PROPERTIES static_cast(0x00020023) +#if ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13) +#define ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC static_cast(0x00020036) +#endif // ZE_API_VERSION_CURRENT_M <= ZE_MAKE_VERSION(1, 13) #define ZEX_STRUCTURE_TYPE_LABEL_DESCRIPTOR static_cast(0x00030002) #define ZEX_STRUCTURE_TYPE_OPERAND_DESCRIPTOR static_cast(0x00030003) #define ZEX_STRUCTURE_TYPE_VARIABLE_DESCRIPTOR static_cast(0x00030004)