Add option for extending cmdlist

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
Krystian Chmielewski
2022-05-13 14:50:48 +00:00
committed by Compute-Runtime-Automation
parent b2b333d354
commit c59abbe495
3 changed files with 10 additions and 2 deletions

View File

@@ -168,7 +168,8 @@ ze_result_t DeviceImp::createCommandList(const ze_command_list_desc_t *desc,
auto productFamily = neoDevice->getHardwareInfo().platform.eProductFamily;
ze_result_t returnValue = ZE_RESULT_SUCCESS;
*commandList = CommandList::create(productFamily, this, engineGroupType, desc->flags, returnValue);
auto createCommandList = getCmdListCreateFunc(desc);
*commandList = createCommandList(productFamily, this, engineGroupType, desc->flags, returnValue);
return returnValue;
}

View File

@@ -130,6 +130,9 @@ struct DeviceImp : public Device {
void populateSubDeviceCopyEngineGroups();
bool isQueueGroupOrdinalValid(uint32_t ordinal);
using CmdListCreateFunT = std::function<ze_command_list_handle_t(uint32_t, Device *, NEO::EngineGroupType, ze_command_list_flags_t, ze_result_t &)>;
CmdListCreateFunT getCmdListCreateFunc(const ze_command_list_desc_t *desc);
protected:
NEO::Device::EngineGroupsT subDeviceCopyEngineGroups{};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -13,4 +13,8 @@ namespace L0 {
void DeviceImp::processAdditionalKernelProperties(NEO::HwHelper &hwHelper, ze_device_module_properties_t *pKernelProperties) {
}
DeviceImp::CmdListCreateFunT DeviceImp::getCmdListCreateFunc(const ze_command_list_desc_t *desc) {
return &CommandList::create;
}
} // namespace L0