Set correct L0 CommandQueue type

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-03-16 10:34:28 +00:00
committed by Compute-Runtime-Automation
parent 96f22f55fc
commit 43d5397de6
3 changed files with 9 additions and 3 deletions

View File

@@ -53,6 +53,8 @@ struct CommandQueue : _ze_command_queue_handle_t {
commandQueuePreemptionMode = newPreemptionMode;
}
bool peekIsCopyOnlyCommandQueue() const { return this->isCopyOnlyCommandQueue; }
protected:
NEO::PreemptionMode commandQueuePreemptionMode = NEO::PreemptionMode::Initial;
bool commandQueueDebugCmdsProgrammed = false;

View File

@@ -76,7 +76,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
for (auto i = 0u; i < numCommandLists; i++) {
auto commandList = CommandList::fromHandle(phCommandLists[i]);
if (isCopyOnlyCommandQueue != commandList->isCopyOnly()) {
if (peekIsCopyOnlyCommandQueue() != commandList->isCopyOnly()) {
return ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE;
}
}

View File

@@ -108,7 +108,7 @@ ze_result_t DeviceImp::createCommandListImmediate(const ze_command_queue_desc_t
ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
ze_command_queue_handle_t *commandQueue) {
auto productFamily = neoDevice->getHardwareInfo().platform.eProductFamily;
auto &platform = neoDevice->getHardwareInfo().platform;
NEO::CommandStreamReceiver *csr = nullptr;
uint32_t engineGroupIndex = desc->ordinal;
@@ -125,7 +125,11 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
UNRECOVERABLE_IF(csr == nullptr);
ze_result_t returnValue = ZE_RESULT_SUCCESS;
*commandQueue = CommandQueue::create(productFamily, this, csr, desc, NEO::EngineGroupType::Copy == static_cast<NEO::EngineGroupType>(engineGroupIndex), false, returnValue);
auto &hwHelper = NEO::HwHelper::get(platform.eRenderCoreFamily);
bool isCopyOnly = hwHelper.isCopyOnlyEngineType(static_cast<NEO::EngineGroupType>(engineGroupIndex));
*commandQueue = CommandQueue::create(platform.eProductFamily, this, csr, desc, isCopyOnly, false, returnValue);
return returnValue;
}