mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Set SkipResourceCleanup in TBX mode
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7ff37cd5fd
commit
06a647a5e9
@@ -276,7 +276,7 @@ bool CommandStreamReceiver::isRcs() const {
|
||||
}
|
||||
|
||||
bool CommandStreamReceiver::skipResourceCleanup() const {
|
||||
return this->getOSInterface() && this->getOSInterface()->getDriverModel() && this->getOSInterface()->getDriverModel()->skipResourceCleanup();
|
||||
return ((this->getOSInterface() && this->getOSInterface()->getDriverModel() && this->getOSInterface()->getDriverModel()->skipResourceCleanup()) || forceSkipResourceCleanupRequired);
|
||||
}
|
||||
|
||||
bool CommandStreamReceiver::isGpuHangDetected() const {
|
||||
|
||||
@@ -500,6 +500,7 @@ class CommandStreamReceiver {
|
||||
bool lastSentUseGlobalAtomics = false;
|
||||
bool useNotifyEnableForPostSync = false;
|
||||
bool dcFlushSupport = false;
|
||||
bool forceSkipResourceCleanupRequired = false;
|
||||
};
|
||||
|
||||
typedef CommandStreamReceiver *(*CommandStreamReceiverCreateFunc)(bool withAubDump,
|
||||
|
||||
@@ -27,6 +27,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
|
||||
protected:
|
||||
typedef CommandStreamReceiverSimulatedHw<GfxFamily> BaseClass;
|
||||
using AUB = typename AUBFamilyMapper<GfxFamily>::AUB;
|
||||
using BaseClass::forceSkipResourceCleanupRequired;
|
||||
using BaseClass::getParametersForWriteMemory;
|
||||
using BaseClass::osContext;
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ TbxCommandStreamReceiverHw<GfxFamily>::TbxCommandStreamReceiverHw(ExecutionEnvir
|
||||
const DeviceBitfield deviceBitfield)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
|
||||
forceSkipResourceCleanupRequired = true;
|
||||
|
||||
physicalAddressAllocator.reset(this->createPhysicalAddressAllocator(&this->peekHwInfo()));
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initAubCenter(this->localMemoryEnabled, "", this->getType());
|
||||
auto aubCenter = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter.get();
|
||||
|
||||
@@ -117,6 +117,14 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenMakeResidentIsC
|
||||
memoryManager->freeGraphicsMemory(graphicsAllocation);
|
||||
}
|
||||
|
||||
TEST(TbxCommandStreamReceiverTest, givenTbxCommandStreamReceiverWhenAskingForSkipResourceCleanupThenReturnTrue) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
std::unique_ptr<CommandStreamReceiver> csr(TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0, 1));
|
||||
EXPECT_NE(nullptr, csr);
|
||||
EXPECT_TRUE(csr->skipResourceCleanup());
|
||||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenItIsCreatedWithAubDumpAndAubCaptureFileNameHasBeenSpecifiedThenItShouldBeUsedToOpenTheFileWithAubCapture) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AUBDumpCaptureFileName.set("aubcapture_file_name.aub");
|
||||
|
||||
Reference in New Issue
Block a user