From 2d34f00b3e7c922771313d3ad1ff087e07536c1c Mon Sep 17 00:00:00 2001 From: Dominik Dabek Date: Mon, 12 Dec 2022 15:06:59 +0000 Subject: [PATCH] Prepare for pool buffer enabling 3/n Add per platform config Reorder checks in allocateBufferFromPool Related-To: NEO-7332 Signed-off-by: Dominik Dabek --- opencl/source/context/context.cpp | 22 +++++++--- opencl/source/context/context.h | 11 ++--- .../mem_obj/buffer_pool_alloc_tests.cpp | 29 +++++++------ .../unit_test/xe_hpg_core/dg2/CMakeLists.txt | 1 + .../dg2/buffer_pool_alloc_tests_dg2.cpp | 43 +++++++++++++++++++ .../xe_hpg_core/dg2/excludes_ocl_dg2.cpp | 1 + shared/source/os_interface/hw_info_config.h | 2 + shared/source/os_interface/hw_info_config.inl | 5 +++ .../dg2/os_agnostic_hw_info_config_dg2.inl | 5 +++ .../os_interface/hw_info_config_tests.cpp | 5 +++ .../dg2/hw_info_config_tests_dg2.cpp | 22 ++++++---- 11 files changed, 111 insertions(+), 35 deletions(-) create mode 100644 opencl/test/unit_test/xe_hpg_core/dg2/buffer_pool_alloc_tests_dg2.cpp diff --git a/opencl/source/context/context.cpp b/opencl/source/context/context.cpp index 98f09a0338..5437a05752 100644 --- a/opencl/source/context/context.cpp +++ b/opencl/source/context/context.cpp @@ -46,7 +46,7 @@ Context::Context( Context::~Context() { gtpinNotifyContextDestroy((cl_context)this); - if (smallBufferPoolAllocator.isAggregatedSmallBuffersEnabled()) { + if (smallBufferPoolAllocator.isAggregatedSmallBuffersEnabled(this)) { smallBufferPoolAllocator.releaseSmallBufferPool(); } @@ -471,7 +471,20 @@ Platform *Context::getPlatformFromProperties(const cl_context_properties *proper } bool Context::isSingleDeviceContext() { - return devices[0]->getNumGenericSubDevices() == 0 && getNumDevices() == 1; + return getNumDevices() == 1 && devices[0]->getNumGenericSubDevices() == 0; +} + +bool Context::BufferPoolAllocator::isAggregatedSmallBuffersEnabled(Context *context) const { + if (DebugManager.flags.ExperimentalSmallBufferPoolAllocator.get() != -1) { + return !!DebugManager.flags.ExperimentalSmallBufferPoolAllocator.get(); + } + bool enabled = false; + if (context->isSingleDeviceContext()) { + auto &hwInfo = context->getDevices()[0]->getHardwareInfo(); + auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily); + enabled = productHelper.isBufferPoolAllocatorSupported(); + } + return enabled; } void Context::BufferPoolAllocator::initAggregatedSmallBuffers(Context *context) { @@ -501,10 +514,9 @@ Buffer *Context::BufferPoolAllocator::allocateBufferFromPool(const MemoryPropert void *hostPtr, cl_int &errcodeRet) { errcodeRet = CL_MEM_OBJECT_ALLOCATION_FAILURE; - if (this->isAggregatedSmallBuffersEnabled() && + if (this->mainStorage && this->isSizeWithinThreshold(size) && - this->flagsAllowBufferFromPool(flags, flagsIntel) && - this->mainStorage) { + this->flagsAllowBufferFromPool(flags, flagsIntel)) { auto lock = std::unique_lock(this->mutex); cl_buffer_region bufferRegion{}; bufferRegion.origin = static_cast(this->chunkAllocator->allocate(size)); diff --git a/opencl/source/context/context.h b/opencl/source/context/context.h index e684dd3edb..54d8cfcdc6 100644 --- a/opencl/source/context/context.h +++ b/opencl/source/context/context.h @@ -60,13 +60,8 @@ class Context : public BaseObject<_cl_context> { void tryFreeFromPoolBuffer(MemObj *possiblePoolBuffer, size_t offset, size_t size); void releaseSmallBufferPool(); - inline bool isAggregatedSmallBuffersEnabled() const { - constexpr bool enable = false; - if (DebugManager.flags.ExperimentalSmallBufferPoolAllocator.get() != -1) { - return !!DebugManager.flags.ExperimentalSmallBufferPoolAllocator.get(); - } - return enable; - } + bool isAggregatedSmallBuffersEnabled(Context *context) const; + void initAggregatedSmallBuffers(Context *context); bool isPoolBuffer(const MemObj *buffer) const; @@ -101,7 +96,7 @@ class Context : public BaseObject<_cl_context> { pContext = nullptr; } else { auto &bufferPoolAllocator = pContext->getBufferPoolAllocator(); - if (bufferPoolAllocator.isAggregatedSmallBuffersEnabled()) { + if (bufferPoolAllocator.isAggregatedSmallBuffersEnabled(pContext)) { bufferPoolAllocator.initAggregatedSmallBuffers(pContext); } } diff --git a/opencl/test/unit_test/mem_obj/buffer_pool_alloc_tests.cpp b/opencl/test/unit_test/mem_obj/buffer_pool_alloc_tests.cpp index 4d7e072e0d..af94863a7e 100644 --- a/opencl/test/unit_test/mem_obj/buffer_pool_alloc_tests.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_pool_alloc_tests.cpp @@ -8,6 +8,7 @@ #include "shared/source/helpers/hw_helper.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_memory_manager.h" +#include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/test_macros/test.h" #include "opencl/test/unit_test/mocks/mock_buffer.h" @@ -29,7 +30,7 @@ class AggregatedSmallBuffersTestTemplate : public ::testing::Test { } void TearDown() override { - if (this->context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled()) { + if (this->context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get())) { this->context->getBufferPoolAllocator().releaseSmallBufferPool(); } } @@ -98,14 +99,14 @@ class AggregatedSmallBuffersKernelTest : public AggregatedSmallBuffersTestTempla using AggregatedSmallBuffersDefaultTest = AggregatedSmallBuffersTestTemplate<-1>; -TEST_F(AggregatedSmallBuffersDefaultTest, givenAggregatedSmallBuffersDefaultWhenCheckIfEnabledThenReturnFalse) { - EXPECT_FALSE(poolAllocator->isAggregatedSmallBuffersEnabled()); +HWTEST_F(AggregatedSmallBuffersDefaultTest, givenAggregatedSmallBuffersDefaultWhenCheckIfEnabledThenReturnFalse) { + EXPECT_FALSE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); } using AggregatedSmallBuffersDisabledTest = AggregatedSmallBuffersTestTemplate<0>; TEST_F(AggregatedSmallBuffersDisabledTest, givenAggregatedSmallBuffersDisabledWhenBufferCreateCalledThenDoNotUsePool) { - ASSERT_FALSE(poolAllocator->isAggregatedSmallBuffersEnabled()); + ASSERT_FALSE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); ASSERT_EQ(poolAllocator->mainStorage, nullptr); std::unique_ptr buffer(Buffer::create(context.get(), flags, size, hostPtr, retVal)); EXPECT_NE(buffer, nullptr); @@ -117,14 +118,14 @@ TEST_F(AggregatedSmallBuffersDisabledTest, givenAggregatedSmallBuffersDisabledWh using AggregatedSmallBuffersEnabledTest = AggregatedSmallBuffersTestTemplate<1>; TEST_F(AggregatedSmallBuffersEnabledTest, givenAggregatedSmallBuffersEnabledWhenAllocatingMainStorageThenMakeDeviceBufferLockable) { - ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled()); + ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); ASSERT_NE(poolAllocator->mainStorage, nullptr); ASSERT_NE(mockMemoryManager->lastAllocationProperties, nullptr); EXPECT_TRUE(mockMemoryManager->lastAllocationProperties->makeDeviceBufferLockable); } TEST_F(AggregatedSmallBuffersEnabledTest, givenAggregatedSmallBuffersEnabledAndSizeLargerThanThresholdWhenBufferCreateCalledThenDoNotUsePool) { - ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled()); + ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); ASSERT_NE(poolAllocator->mainStorage, nullptr); size = PoolAllocator::smallBufferThreshold + 1; std::unique_ptr buffer(Buffer::create(context.get(), flags, size, hostPtr, retVal)); @@ -135,7 +136,7 @@ TEST_F(AggregatedSmallBuffersEnabledTest, givenAggregatedSmallBuffersEnabledAndS } TEST_F(AggregatedSmallBuffersEnabledTest, givenAggregatedSmallBuffersEnabledAndSizeEqualToThresholdWhenBufferCreateCalledThenUsePool) { - ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled()); + ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); ASSERT_NE(poolAllocator->mainStorage, nullptr); std::unique_ptr buffer(Buffer::create(context.get(), flags, size, hostPtr, retVal)); @@ -155,7 +156,7 @@ TEST_F(AggregatedSmallBuffersEnabledTest, givenAggregatedSmallBuffersEnabledAndS } TEST_F(AggregatedSmallBuffersEnabledTest, givenAggregatedSmallBuffersEnabledWhenClReleaseMemObjectCalledThenWaitForEnginesCompletionCalled) { - ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled()); + ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); ASSERT_NE(poolAllocator->mainStorage, nullptr); std::unique_ptr buffer(Buffer::create(context.get(), flags, size, hostPtr, retVal)); @@ -196,7 +197,7 @@ TEST_F(AggregatedSmallBuffersEnabledTest, givenCopyHostPointerWhenCreatingBuffer unsigned char dataToCopy[PoolAllocator::smallBufferThreshold]; hostPtr = dataToCopy; - ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled()); + ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); ASSERT_NE(poolAllocator->mainStorage, nullptr); std::unique_ptr buffer(Buffer::create(context.get(), flags, size, hostPtr, retVal)); if (commandQueue->writeBufferCounter == 0) { @@ -212,7 +213,7 @@ TEST_F(AggregatedSmallBuffersEnabledTest, givenCopyHostPointerWhenCreatingBuffer } TEST_F(AggregatedSmallBuffersEnabledTest, givenAggregatedSmallBuffersEnabledAndSizeEqualToThresholdWhenBufferCreateCalledMultipleTimesThenUsePool) { - ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled()); + ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); ASSERT_NE(poolAllocator->mainStorage, nullptr); constexpr auto buffersToCreate = PoolAllocator::aggregatedSmallBuffersPoolSize / PoolAllocator::smallBufferThreshold; @@ -300,7 +301,7 @@ TEST_F(AggregatedSmallBuffersKernelTest, givenBufferFromPoolWhenOffsetSubbufferI using AggregatedSmallBuffersEnabledTestFailPoolInit = AggregatedSmallBuffersTestTemplate<1, true>; TEST_F(AggregatedSmallBuffersEnabledTestFailPoolInit, givenAggregatedSmallBuffersEnabledAndSizeEqualToThresholdWhenBufferCreateCalledButPoolCreateFailedThenDoNotUsePool) { - ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled()); + ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); ASSERT_EQ(poolAllocator->mainStorage, nullptr); std::unique_ptr buffer(Buffer::create(context.get(), flags, size, hostPtr, retVal)); @@ -315,7 +316,7 @@ TEST_F(AggregatedSmallBuffersEnabledTestDoNotRunSetup, givenAggregatedSmallBuffe testing::internal::CaptureStdout(); DebugManager.flags.PrintDriverDiagnostics.set(1); setUpImpl(); - ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled()); + ASSERT_TRUE(poolAllocator->isAggregatedSmallBuffersEnabled(context.get())); ASSERT_NE(poolAllocator->mainStorage, nullptr); ASSERT_NE(context->driverDiagnostics, nullptr); std::string output = testing::internal::GetCapturedStdout(); @@ -349,8 +350,8 @@ class AggregatedSmallBuffersApiTestTemplate : public ::testing::Test { DebugManagerStateRestore restore; }; -using AggregatedSmallBuffersDefaultApiTest = AggregatedSmallBuffersApiTestTemplate<-1>; -TEST_F(AggregatedSmallBuffersDefaultApiTest, givenNoBufferCreatedWhenReleasingContextThenDoNotLeakMemory) { +using AggregatedSmallBuffersDisabledApiTest = AggregatedSmallBuffersApiTestTemplate<0>; +TEST_F(AggregatedSmallBuffersDisabledApiTest, givenNoBufferCreatedWhenReleasingContextThenDoNotLeakMemory) { EXPECT_EQ(clReleaseContext(context), CL_SUCCESS); } diff --git a/opencl/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt b/opencl/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt index a6694e037e..eb5d3aa745 100644 --- a/opencl/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt +++ b/opencl/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt @@ -13,6 +13,7 @@ if(TESTS_DG2) set(IGDRCL_SRCS_tests_xe_hpg_core_dg2 ${IGDRCL_SRCS_tests_xe_hpg_core_dg2_excludes} ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/buffer_pool_alloc_tests_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/get_device_info_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_cmds_programming_dg2.cpp diff --git a/opencl/test/unit_test/xe_hpg_core/dg2/buffer_pool_alloc_tests_dg2.cpp b/opencl/test/unit_test/xe_hpg_core/dg2/buffer_pool_alloc_tests_dg2.cpp new file mode 100644 index 0000000000..4987336727 --- /dev/null +++ b/opencl/test/unit_test/xe_hpg_core/dg2/buffer_pool_alloc_tests_dg2.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2022 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/xe_hpg_core/hw_cmds_dg2.h" +#include "shared/test/common/test_macros/header/per_product_test_definitions.h" +#include "shared/test/common/test_macros/test.h" + +#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" +#include "opencl/test/unit_test/fixtures/context_fixture.h" +#include "opencl/test/unit_test/mocks/mock_context.h" +using namespace NEO; +namespace Ult { +class AggregatedSmallBuffersDg2DefaultTest : public ContextFixture, + public ClDeviceFixture, + public testing::Test { + protected: + void SetUp() override { + ClDeviceFixture::setUp(); + cl_device_id device = pClDevice; + ContextFixture::setUp(1, &device); + } + + void TearDown() override { + ContextFixture::tearDown(); + ClDeviceFixture::tearDown(); + } +}; + +DG2TEST_F(AggregatedSmallBuffersDg2DefaultTest, givenAggregatedSmallBuffersDefaultWhenCheckIfEnabledThenReturnFalse) { + EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); +} + +DG2TEST_F(AggregatedSmallBuffersDg2DefaultTest, givenAggregatedSmallBuffersDefaultAndMultiDeviceContextWhenCheckIfEnabledThenReturnFalse) { + pContext->devices.push_back(nullptr); + EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); + pContext->devices.pop_back(); +} + +} // namespace Ult diff --git a/opencl/test/unit_test/xe_hpg_core/dg2/excludes_ocl_dg2.cpp b/opencl/test/unit_test/xe_hpg_core/dg2/excludes_ocl_dg2.cpp index d11f8ccb30..8543577ddd 100644 --- a/opencl/test/unit_test/xe_hpg_core/dg2/excludes_ocl_dg2.cpp +++ b/opencl/test/unit_test/xe_hpg_core/dg2/excludes_ocl_dg2.cpp @@ -15,3 +15,4 @@ HWTEST_EXCLUDE_PRODUCT(ProgramTests, givenAtLeastXeHpgCoreWhenGetInternalOptions HWTEST_EXCLUDE_PRODUCT(CmdsProgrammingTestsXeHpgCore, givenL3ToL1DebugFlagWhenStatelessMocsIsProgrammedThenItHasL1CachingOn, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(CmdsProgrammingTestsXeHpgCore, givenAlignedCacheableReadOnlyBufferThenChoseOclBufferConstPolicy, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(CmdsProgrammingTestsXeHpgCore, whenAppendingRssThenProgramWBPL1CachePolicy, IGFX_DG2); +HWTEST_EXCLUDE_PRODUCT(AggregatedSmallBuffersDefaultTest, givenAggregatedSmallBuffersDefaultWhenCheckIfEnabledThenReturnFalse, IGFX_DG2); diff --git a/shared/source/os_interface/hw_info_config.h b/shared/source/os_interface/hw_info_config.h index 81b3a55f12..d5c4e688cd 100644 --- a/shared/source/os_interface/hw_info_config.h +++ b/shared/source/os_interface/hw_info_config.h @@ -149,6 +149,7 @@ class ProductHelper { virtual bool isNonBlockingGpuSubmissionSupported() const = 0; virtual bool isResolveDependenciesByPipeControlsSupported(const HardwareInfo &hwInfo, bool isOOQ) const = 0; virtual bool isMidThreadPreemptionDisallowedForRayTracingKernels() const = 0; + virtual bool isBufferPoolAllocatorSupported() const = 0; virtual bool getFrontEndPropertyScratchSizeSupport() const = 0; virtual bool getFrontEndPropertyPrivateScratchSizeSupport() const = 0; @@ -293,6 +294,7 @@ class ProductHelperHw : public ProductHelper { bool isNonBlockingGpuSubmissionSupported() const override; bool isResolveDependenciesByPipeControlsSupported(const HardwareInfo &hwInfo, bool isOOQ) const override; bool isMidThreadPreemptionDisallowedForRayTracingKernels() const override; + bool isBufferPoolAllocatorSupported() const override; bool getFrontEndPropertyScratchSizeSupport() const override; bool getFrontEndPropertyPrivateScratchSizeSupport() const override; diff --git a/shared/source/os_interface/hw_info_config.inl b/shared/source/os_interface/hw_info_config.inl index a38ea61570..3e70bcf30d 100644 --- a/shared/source/os_interface/hw_info_config.inl +++ b/shared/source/os_interface/hw_info_config.inl @@ -537,6 +537,11 @@ bool ProductHelperHw::isMidThreadPreemptionDisallowedForRayTracingKe return false; } +template +bool ProductHelperHw::isBufferPoolAllocatorSupported() const { + return false; +} + template void ProductHelperHw::fillScmPropertiesSupportStructureBase(StateComputeModePropertiesSupport &propertiesSupport) const { propertiesSupport.coherencyRequired = getScmPropertyCoherencyRequiredSupport(); diff --git a/shared/source/xe_hpg_core/dg2/os_agnostic_hw_info_config_dg2.inl b/shared/source/xe_hpg_core/dg2/os_agnostic_hw_info_config_dg2.inl index a7e52bcbe2..5e768a80a6 100644 --- a/shared/source/xe_hpg_core/dg2/os_agnostic_hw_info_config_dg2.inl +++ b/shared/source/xe_hpg_core/dg2/os_agnostic_hw_info_config_dg2.inl @@ -217,6 +217,11 @@ bool ProductHelperHw::isResolveDependenciesByPipeControlsSupported(c return enabled; } +template <> +bool ProductHelperHw::isBufferPoolAllocatorSupported() const { + return false; +} + template <> std::optional ProductHelperHw::getAubStreamProductFamily() const { return aub_stream::ProductFamily::Dg2; diff --git a/shared/test/unit_test/os_interface/hw_info_config_tests.cpp b/shared/test/unit_test/os_interface/hw_info_config_tests.cpp index e84a357efe..963110f205 100644 --- a/shared/test/unit_test/os_interface/hw_info_config_tests.cpp +++ b/shared/test/unit_test/os_interface/hw_info_config_tests.cpp @@ -677,3 +677,8 @@ HWTEST_F(ProductHelperTest, givenDebugFlagWhenCheckingIsResolveDependenciesByPip EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false)); EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true)); } + +HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned) { + DebugManagerStateRestore restorer; + EXPECT_FALSE(productHelper->isBufferPoolAllocatorSupported()); +} diff --git a/shared/test/unit_test/xe_hpg_core/dg2/hw_info_config_tests_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/hw_info_config_tests_dg2.cpp index 1c159fc3b7..6f8bae2622 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/hw_info_config_tests_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/hw_info_config_tests_dg2.cpp @@ -555,18 +555,24 @@ DG2TEST_F(ProductHelperTestDg2, givenProductHelperWhenGettingEvictIfNecessaryFla DG2TEST_F(ProductHelperTestDg2, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned) { DebugManagerStateRestore restorer; - HardwareInfo hwInfo = *defaultHwInfo; - auto productHelper = ProductHelper::get(hwInfo.platform.eProductFamily); + auto productHelper = ProductHelper::get(defaultHwInfo->platform.eProductFamily); // ResolveDependenciesViaPipeControls = -1 (default) - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(hwInfo, false)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(hwInfo, true)); + EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(*defaultHwInfo, false)); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(*defaultHwInfo, true)); DebugManager.flags.ResolveDependenciesViaPipeControls.set(0); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(hwInfo, false)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(hwInfo, true)); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(*defaultHwInfo, false)); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(*defaultHwInfo, true)); DebugManager.flags.ResolveDependenciesViaPipeControls.set(1); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(hwInfo, false)); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(hwInfo, true)); + EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(*defaultHwInfo, false)); + EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(*defaultHwInfo, true)); +} + +DG2TEST_F(ProductHelperTestDg2, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned) { + DebugManagerStateRestore restorer; + auto productHelper = ProductHelper::get(defaultHwInfo->platform.eProductFamily); + + EXPECT_FALSE(productHelper->isBufferPoolAllocatorSupported()); }