mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
Revert "refactor: Add dc flush mitigation infrastructure"
This reverts commit d6076941a8.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
09cbbc2625
commit
9a6403f3bc
@@ -685,11 +685,6 @@ TEST(GmmTest, givenHwInfoWhenDeviceIsCreatedThenSetThisHwInfoToGmmHelper) {
|
||||
TEST(GmmTest, givenAllocationTypeWhenGettingUsageTypeThenReturnCorrectValue) {
|
||||
MockExecutionEnvironment mockExecutionEnvironment{};
|
||||
const auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<ProductHelper>();
|
||||
|
||||
if (productHelper.isDcFlushMitigated()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < static_cast<uint32_t>(AllocationType::count); i++) {
|
||||
auto allocationType = static_cast<AllocationType>(i);
|
||||
auto uncachedGmmUsageType = productHelper.isNewCoherencyModelSupported() ? GMM_RESOURCE_USAGE_OCL_BUFFER_CSR_UC : GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED;
|
||||
@@ -888,10 +883,6 @@ TEST(GmmTest, givenUncachedDebugFlagMaskSetWhenAskingForUsageTypeThenReturnUncac
|
||||
MockExecutionEnvironment mockExecutionEnvironment{};
|
||||
const auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<ProductHelper>();
|
||||
|
||||
if (productHelper.isDcFlushMitigated()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
constexpr int64_t bufferMask = 1 << (static_cast<int64_t>(AllocationType::buffer) - 1);
|
||||
constexpr int64_t imageMask = 1 << (static_cast<int64_t>(AllocationType::image) - 1);
|
||||
|
||||
|
||||
@@ -311,11 +311,9 @@ HWTEST_F(ProductHelperTest, givenVariousValuesWhenGettingAubStreamSteppingFromHw
|
||||
|
||||
HWTEST_F(ProductHelperTest, givenDcFlushMitigationWhenOverridePatAndUsageForDcFlushMitigationThenReturnCorrectValue) {
|
||||
DebugManagerStateRestore restorer;
|
||||
if (!productHelper->isDcFlushMitigated()) {
|
||||
for (auto i = 0; i < static_cast<int>(AllocationType::count); ++i) {
|
||||
auto allocationType = static_cast<AllocationType>(i);
|
||||
EXPECT_FALSE(productHelper->overridePatAndUsageForDcFlushMitigation(allocationType));
|
||||
}
|
||||
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) {
|
||||
|
||||
@@ -2873,11 +2873,7 @@ HWTEST_F(WddmMemoryManagerTest, givenInternalHeapOrLinearStreamTypeWhenAllocatin
|
||||
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
|
||||
if (rootDeviceEnvironment->getProductHelper().isDcFlushMitigated()) {
|
||||
EXPECT_TRUE(allocation->getDefaultGmm()->resourceParams.Usage == GMM_RESOURCE_USAGE_TYPE::GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER_CACHELINE_MISALIGNED);
|
||||
} else {
|
||||
EXPECT_TRUE(allocation->getDefaultGmm()->resourceParams.Usage == GMM_RESOURCE_USAGE_TYPE::GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER);
|
||||
}
|
||||
EXPECT_TRUE(allocation->getDefaultGmm()->resourceParams.Usage == GMM_RESOURCE_USAGE_TYPE::GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER);
|
||||
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
@@ -2889,11 +2885,7 @@ HWTEST_F(WddmMemoryManagerTest, givenInternalHeapOrLinearStreamTypeWhenAllocatin
|
||||
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
|
||||
if (rootDeviceEnvironment->getProductHelper().isDcFlushMitigated()) {
|
||||
EXPECT_TRUE(allocation->getDefaultGmm()->resourceParams.Usage == GMM_RESOURCE_USAGE_TYPE::GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER_CACHELINE_MISALIGNED);
|
||||
} else {
|
||||
EXPECT_TRUE(allocation->getDefaultGmm()->resourceParams.Usage == GMM_RESOURCE_USAGE_TYPE::GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER);
|
||||
}
|
||||
EXPECT_TRUE(allocation->getDefaultGmm()->resourceParams.Usage == GMM_RESOURCE_USAGE_TYPE::GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER);
|
||||
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
@@ -29,5 +29,5 @@ LNLTEST_F(GfxCoreHelperTestsLnl, givenCommandBufferAllocationTypeWhenGetAllocati
|
||||
}
|
||||
|
||||
LNLTEST_F(GfxCoreHelperTestsLnl, WhenAskingForDcFlushThenReturnTrue) {
|
||||
EXPECT_NE(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, this->pDevice->getRootDeviceEnvironment()), this->pDevice->getRootDeviceEnvironment().getProductHelper().isDcFlushMitigated());
|
||||
EXPECT_TRUE(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, this->pDevice->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
@@ -89,7 +89,6 @@ LNLTEST_F(LnlProductHelper, givenCompilerProductHelperWhenGetDefaultHwIpVersionT
|
||||
|
||||
LNLTEST_F(LnlProductHelper, whenCheckPreferredAllocationMethodThenAllocateByKmdIsReturnedExceptTagBufferAndTimestampPacketTagBuffer) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.AllowDcFlush.set(1);
|
||||
for (auto i = 0; i < static_cast<int>(AllocationType::count); ++i) {
|
||||
auto allocationType = static_cast<AllocationType>(i);
|
||||
auto preferredAllocationMethod = productHelper->getPreferredAllocationMethod(allocationType);
|
||||
@@ -127,13 +126,11 @@ LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckOverrideAllocationCacheab
|
||||
}
|
||||
|
||||
LNLTEST_F(LnlProductHelper, givenExternalHostPtrWhenMitigateDcFlushThenOverrideCacheable) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.AllowDcFlush.set(1);
|
||||
|
||||
AllocationData allocationData{};
|
||||
allocationData.type = AllocationType::externalHostPtr;
|
||||
EXPECT_FALSE(productHelper->overrideAllocationCacheable(allocationData));
|
||||
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.AllowDcFlush.set(0);
|
||||
|
||||
for (auto i = 0; i < static_cast<int>(AllocationType::count); ++i) {
|
||||
|
||||
@@ -23,14 +23,8 @@ LNLTEST_F(LnlProductHelperWindows, givenProductHelperWhenCheckDirectSubmissionSu
|
||||
EXPECT_TRUE(productHelper->isDirectSubmissionSupported(releaseHelper));
|
||||
}
|
||||
|
||||
LNLTEST_F(LnlProductHelperWindows, givenProductHelperWhenDcFlushMitigationThenReturnTrue) {
|
||||
EXPECT_TRUE(productHelper->mitigateDcFlush());
|
||||
EXPECT_TRUE(productHelper->isDcFlushMitigated());
|
||||
}
|
||||
|
||||
LNLTEST_F(LnlProductHelperWindows, givenProductHelperWhenOverridePatIndexCalledThenCorrectValueIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.AllowDcFlush.set(1);
|
||||
|
||||
uint64_t expectedPatIndex = 6u;
|
||||
EXPECT_EQ(expectedPatIndex, productHelper->overridePatIndex(0u, expectedPatIndex, AllocationType::bufferHostMemory));
|
||||
|
||||
Reference in New Issue
Block a user