Skip to content

Commit ed813de

Browse files
performance: Always allocate by KMD on Xe2
Related-To: NEO-13441 Signed-off-by: Lukasz Jobczyk <[email protected]>
1 parent 548f93c commit ed813de

File tree

4 files changed

+6
-28
lines changed

4 files changed

+6
-28
lines changed

shared/source/xe2_hpg_core/bmg/os_agnostic_product_helper_bmg.inl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,7 @@ std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStre
3232

3333
template <>
3434
std::optional<GfxMemoryAllocationMethod> ProductHelperHw<gfxProduct>::getPreferredAllocationMethod(AllocationType allocationType) const {
35-
switch (allocationType) {
36-
case AllocationType::tagBuffer:
37-
case AllocationType::timestampPacketTagBuffer:
38-
return {};
39-
default:
40-
return GfxMemoryAllocationMethod::allocateByKmd;
41-
}
35+
return GfxMemoryAllocationMethod::allocateByKmd;
4236
}
4337

4438
template <>

shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,7 @@ std::optional<aub_stream::ProductFamily> ProductHelperHw<gfxProduct>::getAubStre
3232

3333
template <>
3434
std::optional<GfxMemoryAllocationMethod> ProductHelperHw<gfxProduct>::getPreferredAllocationMethod(AllocationType allocationType) const {
35-
switch (allocationType) {
36-
case AllocationType::tagBuffer:
37-
case AllocationType::timestampPacketTagBuffer:
38-
return this->isDcFlushMitigated() ? std::optional<GfxMemoryAllocationMethod>(GfxMemoryAllocationMethod::allocateByKmd) : std::nullopt;
39-
default:
40-
return GfxMemoryAllocationMethod::allocateByKmd;
41-
}
35+
return GfxMemoryAllocationMethod::allocateByKmd;
4236
}
4337

4438
template <>

shared/test/unit_test/xe2_hpg_core/bmg/product_helper_tests_bmg.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,8 @@ BMGTEST_F(BmgProductHelper, whenCheckPreferredAllocationMethodThenAllocateByKmdI
7373
for (auto i = 0; i < static_cast<int>(AllocationType::count); i++) {
7474
auto allocationType = static_cast<AllocationType>(i);
7575
auto preferredAllocationMethod = productHelper->getPreferredAllocationMethod(allocationType);
76-
if (allocationType == AllocationType::tagBuffer ||
77-
allocationType == AllocationType::timestampPacketTagBuffer) {
78-
EXPECT_FALSE(preferredAllocationMethod.has_value());
79-
} else {
80-
EXPECT_TRUE(preferredAllocationMethod.has_value());
81-
EXPECT_EQ(GfxMemoryAllocationMethod::allocateByKmd, preferredAllocationMethod.value());
82-
}
76+
EXPECT_TRUE(preferredAllocationMethod.has_value());
77+
EXPECT_EQ(GfxMemoryAllocationMethod::allocateByKmd, preferredAllocationMethod.value());
8378
}
8479
}
8580

shared/test/unit_test/xe2_hpg_core/lnl/product_helper_tests_lnl.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,8 @@ LNLTEST_F(LnlProductHelper, whenCheckPreferredAllocationMethodThenAllocateByKmdI
9797
for (auto i = 0; i < static_cast<int>(AllocationType::count); ++i) {
9898
auto allocationType = static_cast<AllocationType>(i);
9999
auto preferredAllocationMethod = productHelper->getPreferredAllocationMethod(allocationType);
100-
if (allocationType == AllocationType::tagBuffer ||
101-
allocationType == AllocationType::timestampPacketTagBuffer) {
102-
EXPECT_FALSE(preferredAllocationMethod.has_value());
103-
} else {
104-
EXPECT_TRUE(preferredAllocationMethod.has_value());
105-
EXPECT_EQ(GfxMemoryAllocationMethod::allocateByKmd, preferredAllocationMethod.value());
106-
}
100+
EXPECT_TRUE(preferredAllocationMethod.has_value());
101+
EXPECT_EQ(GfxMemoryAllocationMethod::allocateByKmd, preferredAllocationMethod.value());
107102
}
108103
debugManager.flags.AllowDcFlush.set(0);
109104
for (auto i = 0; i < static_cast<int>(AllocationType::count); ++i) {

0 commit comments

Comments
 (0)