mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 19:32:25 +08:00
Skip dumping aub allocations on BCS engine
Change-Id: I7d1cf3b0a0d6e16fd2df2fad1ba5e71dfe04ae23 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
472a75912d
commit
aafebb2e85
@@ -22,6 +22,7 @@
|
||||
#include "runtime/command_stream/aub_subcapture.h"
|
||||
#include "runtime/command_stream/command_stream_receiver.h"
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
#include "runtime/helpers/engine_node_helper.h"
|
||||
#include "runtime/helpers/hardware_context_controller.h"
|
||||
#include "runtime/helpers/neo_driver_version.h"
|
||||
#include "runtime/memory_manager/memory_banks.h"
|
||||
@@ -728,6 +729,10 @@ void AUBCommandStreamReceiverHw<GfxFamily>::processResidency(const ResidencyCont
|
||||
|
||||
template <typename GfxFamily>
|
||||
void AUBCommandStreamReceiverHw<GfxFamily>::dumpAllocation(GraphicsAllocation &gfxAllocation) {
|
||||
if (isBcs(this->osContext->getEngineType())) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.get()) {
|
||||
if (!gfxAllocation.isAllocDumpable()) {
|
||||
return;
|
||||
|
||||
@@ -13,4 +13,8 @@ bool isCcs(aub_stream::EngineType engineType) {
|
||||
return engineType == aub_stream::ENGINE_CCS;
|
||||
}
|
||||
|
||||
bool isBcs(aub_stream::EngineType engineType) {
|
||||
return engineType == aub_stream::ENGINE_BCS;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
namespace NEO {
|
||||
|
||||
bool isCcs(aub_stream::EngineType engineType);
|
||||
bool isBcs(aub_stream::EngineType engineType);
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -889,6 +889,29 @@ HWTEST_F(AubCommandStreamReceiverTests, givenGraphicsAllocationWritableWhenDumpA
|
||||
memoryManager->freeGraphicsMemory(gfxAllocation);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenBcsEngineWhenDumpAllocationCalledThenIgnore) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
|
||||
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex());
|
||||
MockOsContext osContext(0, 1, aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false);
|
||||
aubCsr.setupContext(osContext);
|
||||
|
||||
auto mockHardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
||||
auto memoryManager = pDevice->getMemoryManager();
|
||||
auto gfxAllocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize, GraphicsAllocation::AllocationType::BUFFER});
|
||||
gfxAllocation->setMemObjectsAllocationWithWritableFlags(true);
|
||||
EXPECT_TRUE(AubAllocDump::isWritableBuffer(*gfxAllocation));
|
||||
|
||||
aubCsr.dumpAllocation(*gfxAllocation);
|
||||
|
||||
EXPECT_FALSE(mockHardwareContext->dumpSurfaceCalled);
|
||||
EXPECT_TRUE(AubAllocDump::isWritableBuffer(*gfxAllocation));
|
||||
|
||||
memoryManager->freeGraphicsMemory(gfxAllocation);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenCompressedGraphicsAllocationWritableWhenDumpAllocationIsCalledAndDumpFormatIsSpecifiedThenGraphicsAllocationShouldBeDumped) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
DebugManager.flags.AUBDumpBufferFormat.set("TRE");
|
||||
|
||||
Reference in New Issue
Block a user