feature: add graph support for new append functions

Related-To: NEO-15606, NEO-15571

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2025-08-29 14:35:40 +00:00
committed by Compute-Runtime-Automation
parent 3da7a3364c
commit e88d1287c0
10 changed files with 202 additions and 46 deletions

View File

@@ -23,23 +23,27 @@ ze_result_t CommandList::validateLaunchParams(const Kernel &kernel, const CmdLis
}
ze_result_t CommandList::cloneAppendKernelExtensions(const ze_base_desc_t *desc, void *&outPnext) {
if (desc->stype == ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC) {
auto cooperativeDesc = reinterpret_cast<const ze_command_list_append_launch_kernel_param_cooperative_desc_t *>(desc);
auto cloneCooperativeDesc = new ze_command_list_append_launch_kernel_param_cooperative_desc_t;
*cloneCooperativeDesc = *cooperativeDesc;
cloneCooperativeDesc->pNext = nullptr;
outPnext = cloneCooperativeDesc;
} else {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
if (desc) {
if (desc->stype == ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC) {
auto cooperativeDesc = reinterpret_cast<const ze_command_list_append_launch_kernel_param_cooperative_desc_t *>(desc);
auto cloneCooperativeDesc = new ze_command_list_append_launch_kernel_param_cooperative_desc_t;
*cloneCooperativeDesc = *cooperativeDesc;
cloneCooperativeDesc->pNext = nullptr;
outPnext = cloneCooperativeDesc;
} else {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
}
return ZE_RESULT_SUCCESS;
}
void CommandList::freeClonedAppendKernelExtensions(void *pNext) {
auto desc = reinterpret_cast<ze_base_desc_t *>(pNext);
if (desc->stype == ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC) {
auto cooperativeDesc = reinterpret_cast<ze_command_list_append_launch_kernel_param_cooperative_desc_t *>(desc);
delete cooperativeDesc;
if (desc) {
if (desc->stype == ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC) {
auto cooperativeDesc = reinterpret_cast<ze_command_list_append_launch_kernel_param_cooperative_desc_t *>(desc);
delete cooperativeDesc;
}
}
}