feature: introduce highPriority engine usage

Related-To: NEO-7824

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2023-12-20 18:34:37 +00:00
committed by Compute-Runtime-Automation
parent 3867e44cc4
commit c90dab7a2d
6 changed files with 10 additions and 2 deletions

View File

@@ -152,7 +152,7 @@ CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device
engineGroupType = deviceImp->getInternalEngineGroupType();
}
} else {
returnValue = device->getCsrForOrdinalAndIndex(&csr, desc->ordinal, desc->index);
returnValue = device->getCsrForOrdinalAndIndexWithPriority(&csr, desc->ordinal, desc->index, desc->priority);
if (returnValue != ZE_RESULT_SUCCESS) {
return commandList;
}

View File

@@ -139,6 +139,7 @@ struct Device : _ze_device_handle_t {
virtual void setSysmanHandle(SysmanDevice *pSysmanDevice) = 0;
virtual SysmanDevice *getSysmanHandle() = 0;
virtual ze_result_t getCsrForOrdinalAndIndex(NEO::CommandStreamReceiver **csr, uint32_t ordinal, uint32_t index) = 0;
virtual ze_result_t getCsrForOrdinalAndIndexWithPriority(NEO::CommandStreamReceiver **csr, uint32_t ordinal, uint32_t index, ze_command_queue_priority_t priority) = 0;
virtual ze_result_t getCsrForLowPriority(NEO::CommandStreamReceiver **csr) = 0;
virtual NEO::GraphicsAllocation *obtainReusableAllocation(size_t requiredSize, NEO::AllocationType type) = 0;
virtual void storeReusableAllocation(NEO::GraphicsAllocation &alloc) = 0;

View File

@@ -306,7 +306,7 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
if (commandQueueDesc.priority == ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_LOW && !isCopyOnly) {
getCsrForLowPriority(&csr);
} else {
auto ret = getCsrForOrdinalAndIndex(&csr, commandQueueDesc.ordinal, commandQueueDesc.index);
auto ret = getCsrForOrdinalAndIndexWithPriority(&csr, commandQueueDesc.ordinal, commandQueueDesc.index, commandQueueDesc.priority);
if (ret != ZE_RESULT_SUCCESS) {
return ret;
}
@@ -1632,6 +1632,10 @@ ze_result_t DeviceImp::getCsrForOrdinalAndIndex(NEO::CommandStreamReceiver **csr
return ZE_RESULT_SUCCESS;
}
ze_result_t DeviceImp::getCsrForOrdinalAndIndexWithPriority(NEO::CommandStreamReceiver **csr, uint32_t ordinal, uint32_t index, ze_command_queue_priority_t priority) {
return getCsrForOrdinalAndIndex(csr, ordinal, index);
}
ze_result_t DeviceImp::getCsrForLowPriority(NEO::CommandStreamReceiver **csr) {
NEO::Device *activeDevice = getActiveDevice();
if (this->implicitScalingCapable) {

View File

@@ -112,6 +112,7 @@ struct DeviceImp : public Device, NEO::NonCopyableOrMovableClass {
void setSysmanHandle(SysmanDevice *pSysman) override;
SysmanDevice *getSysmanHandle() override;
ze_result_t getCsrForOrdinalAndIndex(NEO::CommandStreamReceiver **csr, uint32_t ordinal, uint32_t index) override;
ze_result_t getCsrForOrdinalAndIndexWithPriority(NEO::CommandStreamReceiver **csr, uint32_t ordinal, uint32_t index, ze_command_queue_priority_t priority) override;
ze_result_t getCsrForLowPriority(NEO::CommandStreamReceiver **csr) override;
NEO::GraphicsAllocation *obtainReusableAllocation(size_t requiredSize, NEO::AllocationType type) override;
void storeReusableAllocation(NEO::GraphicsAllocation &alloc) override;