Skip to content

Commit bbc7277

Browse files
fix: disable l0 usm pooling, bmg
Related-To: GSD-11432 Signed-off-by: Dominik Dabek <[email protected]> Source: 15553b4
1 parent 4851080 commit bbc7277

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

shared/source/xe2_hpg_core/bmg/os_agnostic_product_helper_bmg.inl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "shared/source/command_stream/command_stream_receiver.h"
9+
#include "shared/source/helpers/api_specific_config.h"
910
#include "shared/source/memory_manager/allocation_type.h"
1011

1112
#include "aubstream/product_family.h"
@@ -56,4 +57,14 @@ bool ProductHelperHw<gfxProduct>::checkBcsForDirectSubmissionStop() const {
5657
return true;
5758
}
5859

60+
template <>
61+
bool ProductHelperHw<gfxProduct>::isDeviceUsmPoolAllocatorSupported() const {
62+
return ApiSpecificConfig::OCL == ApiSpecificConfig::getApiType();
63+
}
64+
65+
template <>
66+
bool ProductHelperHw<gfxProduct>::isHostUsmPoolAllocatorSupported() const {
67+
return ApiSpecificConfig::OCL == ApiSpecificConfig::getApiType();
68+
}
69+
5970
} // namespace NEO

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,24 @@
66
*/
77

88
#include "shared/source/command_stream/stream_properties.h"
9+
#include "shared/source/helpers/api_specific_config.h"
910
#include "shared/source/helpers/compiler_product_helper.h"
1011
#include "shared/source/memory_manager/allocation_type.h"
1112
#include "shared/source/os_interface/product_helper.h"
1213
#include "shared/source/xe2_hpg_core/hw_cmds_bmg.h"
1314
#include "shared/source/xe2_hpg_core/hw_info_xe2_hpg_core.h"
1415
#include "shared/test/common/helpers/default_hw_info.h"
16+
#include "shared/test/common/helpers/variable_backup.h"
1517
#include "shared/test/common/mocks/mock_release_helper.h"
1618
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
1719
#include "shared/test/common/test_macros/test.h"
1820
#include "shared/test/unit_test/os_interface/product_helper_tests.h"
1921

2022
#include "aubstream/product_family.h"
2123
#include "neo_aot_platforms.h"
22-
24+
namespace NEO {
25+
extern ApiSpecificConfig::ApiType apiTypeForUlts;
26+
}
2327
using namespace NEO;
2428

2529
using BmgProductHelper = ProductHelperTest;
@@ -131,3 +135,16 @@ BMGTEST_F(BmgProductHelper, whenAdjustScratchSizeThenSizeIsDoubled) {
131135
BMGTEST_F(BmgProductHelper, givenProductHelperWhenCallDeferMOCSToPatOnWSLThenTrueIsReturned) {
132136
EXPECT_TRUE(productHelper->deferMOCSToPatIndex(true));
133137
}
138+
139+
BMGTEST_F(BmgProductHelper, givenProductHelperWhenCheckingIsHostDeviceUsmPoolAllocatorSupportedThenCorrectValueIsReturned) {
140+
{
141+
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::OCL);
142+
EXPECT_TRUE(productHelper->isHostUsmPoolAllocatorSupported());
143+
EXPECT_TRUE(productHelper->isDeviceUsmPoolAllocatorSupported());
144+
}
145+
{
146+
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::L0);
147+
EXPECT_FALSE(productHelper->isHostUsmPoolAllocatorSupported());
148+
EXPECT_FALSE(productHelper->isDeviceUsmPoolAllocatorSupported());
149+
}
150+
}

0 commit comments

Comments
 (0)