feature: Adjust PATs for dc flush mitigation

Related-To: NEO-10556

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-04-15 12:46:28 +00:00
committed by Compute-Runtime-Automation
parent 189d35b15e
commit a230c762e0
7 changed files with 48 additions and 12 deletions

View File

@@ -745,6 +745,7 @@ TEST(GmmTest, givenAllocationTypeAndMitigatedDcFlushWhenGettingUsageTypeThenRetu
case AllocationType::svmZeroCopy:
case AllocationType::internalHostMemory:
case AllocationType::timestampPacketTagBuffer:
case AllocationType::gpuTimestampDeviceBuffer:
case AllocationType::bufferHostMemory:
case AllocationType::tagBuffer:
expectedUsage = uncachedGmmUsageType;
@@ -793,9 +794,6 @@ TEST(GmmTest, givenAllocationTypeAndMitigatedDcFlushWhenGettingUsageTypeThenRetu
}
EXPECT_EQ(expectedUsage, usage);
if (expectedUsage != usage) {
std::cout << "fail";
}
}
}

View File

@@ -309,6 +309,31 @@ HWTEST_F(ProductHelperTest, givenVariousValuesWhenGettingAubStreamSteppingFromHw
EXPECT_EQ(AubMemDump::SteppingValues::A, mockProductHelper.getAubStreamSteppingFromHwRevId(pInHwInfo));
}
HWTEST_F(ProductHelperTest, givenDcFlushMitigationWhenOverridePatAndUsageForDcFlushMitigationThenReturnCorrectValue) {
DebugManagerStateRestore restorer;
for (auto i = 0; i < static_cast<int>(AllocationType::count); ++i) {
auto allocationType = static_cast<AllocationType>(i);
EXPECT_FALSE(productHelper->overridePatAndUsageForDcFlushMitigation(allocationType));
}
debugManager.flags.AllowDcFlush.set(0);
for (auto i = 0; i < static_cast<int>(AllocationType::count); ++i) {
auto allocationType = static_cast<AllocationType>(i);
if (allocationType == AllocationType::externalHostPtr ||
allocationType == AllocationType::bufferHostMemory ||
allocationType == AllocationType::mapAllocation ||
allocationType == AllocationType::svmCpu ||
allocationType == AllocationType::svmZeroCopy ||
allocationType == AllocationType::internalHostMemory ||
allocationType == AllocationType::timestampPacketTagBuffer ||
allocationType == AllocationType::tagBuffer ||
allocationType == AllocationType::gpuTimestampDeviceBuffer) {
EXPECT_EQ(productHelper->overridePatAndUsageForDcFlushMitigation(allocationType), productHelper->isDcFlushMitigated());
} else {
EXPECT_FALSE(productHelper->overridePatAndUsageForDcFlushMitigation(allocationType));
}
}
}
HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedForDefaultEngineTypeAdjustmentThenFalseIsReturned) {
EXPECT_FALSE(productHelper->isDefaultEngineTypeAdjustmentRequired(pInHwInfo));