mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
performance: Optimize heap handling when mitigate dc flush
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
915ff42566
commit
a54a3bf624
@@ -79,6 +79,17 @@ void CommandList::removeHostPtrAllocations() {
|
||||
hostPtrMap.clear();
|
||||
}
|
||||
|
||||
void CommandList::forceDcFlushForDcFlushMitigation() {
|
||||
if (this->device && this->device->getProductHelper().isDcFlushMitigated()) {
|
||||
for (const auto &engine : this->device->getNEODevice()->getMemoryManager()->getRegisteredEngines(this->device->getNEODevice()->getRootDeviceIndex())) {
|
||||
if (engine.commandStreamReceiver->isDirectSubmissionEnabled()) {
|
||||
engine.commandStreamReceiver->registerDcFlushForDcMitigation();
|
||||
engine.commandStreamReceiver->flushTagUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CommandList::removeMemoryPrefetchAllocations() {
|
||||
if (this->performMemoryPrefetch) {
|
||||
auto prefetchManager = this->device->getDriverHandle()->getMemoryManager()->getPrefetchManager();
|
||||
|
||||
@@ -200,6 +200,8 @@ struct CommandList : _ze_command_list_handle_t {
|
||||
return commandListPerThreadScratchSize[slotId];
|
||||
}
|
||||
|
||||
void forceDcFlushForDcFlushMitigation();
|
||||
|
||||
void setOrdinal(uint32_t ord) { ordinal = ord; }
|
||||
void setCommandListPerThreadScratchSize(uint32_t slotId, uint32_t size) {
|
||||
UNRECOVERABLE_IF(slotId > 1);
|
||||
|
||||
@@ -157,6 +157,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::reset() {
|
||||
|
||||
this->inOrderPatchCmds.clear();
|
||||
|
||||
this->forceDcFlushForDcFlushMitigation();
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,8 @@ ze_result_t CommandListImp::destroy() {
|
||||
}
|
||||
}
|
||||
|
||||
this->forceDcFlushForDcFlushMitigation();
|
||||
|
||||
delete this;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user