mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
Compute-Runtime-Automation
parent
3da7a3364c
commit
e88d1287c0
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user