6
6
*/
7
7
8
8
#include " shared/source/command_stream/stream_properties.h"
9
+ #include " shared/source/helpers/api_specific_config.h"
9
10
#include " shared/source/helpers/compiler_product_helper.h"
10
11
#include " shared/source/memory_manager/allocation_type.h"
11
12
#include " shared/source/os_interface/product_helper.h"
12
13
#include " shared/source/xe2_hpg_core/hw_cmds_bmg.h"
13
14
#include " shared/source/xe2_hpg_core/hw_info_xe2_hpg_core.h"
14
15
#include " shared/test/common/helpers/default_hw_info.h"
16
+ #include " shared/test/common/helpers/variable_backup.h"
15
17
#include " shared/test/common/mocks/mock_release_helper.h"
16
18
#include " shared/test/common/test_macros/header/per_product_test_definitions.h"
17
19
#include " shared/test/common/test_macros/test.h"
18
20
#include " shared/test/unit_test/os_interface/product_helper_tests.h"
19
21
20
22
#include " aubstream/product_family.h"
21
23
#include " neo_aot_platforms.h"
22
-
24
+ namespace NEO {
25
+ extern ApiSpecificConfig::ApiType apiTypeForUlts;
26
+ }
23
27
using namespace NEO ;
24
28
25
29
using BmgProductHelper = ProductHelperTest;
@@ -131,3 +135,16 @@ BMGTEST_F(BmgProductHelper, whenAdjustScratchSizeThenSizeIsDoubled) {
131
135
BMGTEST_F (BmgProductHelper, givenProductHelperWhenCallDeferMOCSToPatOnWSLThenTrueIsReturned) {
132
136
EXPECT_TRUE (productHelper->deferMOCSToPatIndex (true ));
133
137
}
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