Revert "fix: Flush caches on cmd list destroy with debugger"

This reverts commit 35517d6f29.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2025-01-28 21:11:43 +01:00
committed by Compute-Runtime-Automation
parent d7ca6568fc
commit 894b788267

View File

@@ -54,20 +54,21 @@ ze_result_t CommandListImp::destroy() {
getCsr(false)->waitForCompletionWithTimeout(NEO::WaitParams{false, false, false, timeoutMicroseconds}, getCsr(false)->peekTaskCount());
}
auto debugger = this->getDevice() && this->getDevice()->getL0Debugger();
if (!isCopyOnly(false) &&
((!isImmediateType() && this->stateBaseAddressTracking) || debugger) &&
if (!isImmediateType() &&
!isCopyOnly(false) &&
this->stateBaseAddressTracking &&
this->cmdListHeapAddressModel == NEO::HeapAddressModel::privateHeaps) {
auto surfaceStateHeap = this->commandContainer.getIndirectHeap(NEO::HeapType::surfaceState);
if (surfaceStateHeap) {
auto heapAllocation = surfaceStateHeap->getGraphicsAllocation();
if (debugger || surfaceStateHeap) {
auto rootDeviceIndex = device->getRootDeviceIndex();
auto &deviceEngines = device->getNEODevice()->getMemoryManager()->getRegisteredEngines(rootDeviceIndex);
for (auto &engine : deviceEngines) {
if (NEO::EngineHelpers::isComputeEngine(engine.getEngineType())) {
auto contextId = engine.osContext->getContextId();
if (engine.osContext->isInitialized() && (debugger || (surfaceStateHeap && surfaceStateHeap->getGraphicsAllocation()->isUsedByOsContext(contextId) && surfaceStateHeap->getGraphicsAllocation()->getTaskCount(contextId) > 0))) {
if (heapAllocation->isUsedByOsContext(contextId) && engine.osContext->isInitialized() && heapAllocation->getTaskCount(contextId) > 0) {
engine.commandStreamReceiver->sendRenderStateCacheFlush();
}
}