mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 07:08:04 +08:00
feature: introduce highPriority engine usage
Related-To: NEO-7824 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3867e44cc4
commit
c90dab7a2d
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user