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+ }
2327using namespace NEO ;
2428
2529using BmgProductHelper = ProductHelperTest;
@@ -131,3 +135,16 @@ BMGTEST_F(BmgProductHelper, whenAdjustScratchSizeThenSizeIsDoubled) {
131135BMGTEST_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