fix(ocl): disable buffer pooling on windows

Resolves: HSD-22019729729

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-06-07 11:46:57 +00:00
committed by Compute-Runtime-Automation
parent dab221830e
commit ce27e0f924
8 changed files with 34 additions and 47 deletions

View File

@@ -139,46 +139,6 @@ HWTEST2_F(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOr
context->devices.pop_back(); context->devices.pop_back();
} }
HWTEST2_F(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue, IsXeHpgCore) {
DebugManagerStateRestore restore;
// Single device context
{
debugManager.flags.ExperimentalSmallBufferPoolAllocator.set(-1);
EXPECT_TRUE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get()));
}
{
debugManager.flags.ExperimentalSmallBufferPoolAllocator.set(0);
EXPECT_FALSE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get()));
}
{
debugManager.flags.ExperimentalSmallBufferPoolAllocator.set(1);
EXPECT_TRUE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get()));
}
{
debugManager.flags.ExperimentalSmallBufferPoolAllocator.set(2);
EXPECT_TRUE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get()));
}
// Multi device context
context->devices.push_back(nullptr);
{
debugManager.flags.ExperimentalSmallBufferPoolAllocator.set(-1);
EXPECT_FALSE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get()));
}
{
debugManager.flags.ExperimentalSmallBufferPoolAllocator.set(0);
EXPECT_FALSE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get()));
}
{
debugManager.flags.ExperimentalSmallBufferPoolAllocator.set(1);
EXPECT_FALSE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get()));
}
{
debugManager.flags.ExperimentalSmallBufferPoolAllocator.set(2);
EXPECT_TRUE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get()));
}
context->devices.pop_back();
}
HWTEST2_F(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue, IsXeHpcCore) { HWTEST2_F(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue, IsXeHpcCore) {
DebugManagerStateRestore restore; DebugManagerStateRestore restore;
// Single device context // Single device context

View File

@@ -204,11 +204,6 @@ bool ProductHelperHw<gfxProduct>::isResolveDependenciesByPipeControlsSupported(c
return enabled; return enabled;
} }
template <>
bool ProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
return true;
}
template <> template <>
bool ProductHelperHw<gfxProduct>::isUsmPoolAllocatorSupported() const { bool ProductHelperHw<gfxProduct>::isUsmPoolAllocatorSupported() const {
return true; return true;

View File

@@ -67,5 +67,10 @@ bool ProductHelperHw<gfxProduct>::getUuid(NEO::DriverModel *driverModel, const u
return true; return true;
} }
template <>
bool ProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
return true;
}
template class ProductHelperHw<gfxProduct>; template class ProductHelperHw<gfxProduct>;
} // namespace NEO } // namespace NEO

View File

@@ -38,5 +38,10 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
return 0; return 0;
} }
template <>
bool ProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
return false;
}
template class ProductHelperHw<gfxProduct>; template class ProductHelperHw<gfxProduct>;
} // namespace NEO } // namespace NEO

View File

@@ -814,7 +814,7 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocator
EXPECT_FALSE(productHelper->isBufferPoolAllocatorSupported()); EXPECT_FALSE(productHelper->isBufferPoolAllocatorSupported());
} }
HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned, IsXeHpgCore) { HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned, IsXeLpg) {
EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported()); EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported());
} }

View File

@@ -43,3 +43,7 @@ DG2TEST_F(Dg2ProductHelperLinux, GivenDg2WhenConfigureHardwareCustomThenKmdNotif
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(20ll, pInHwInfo.capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); EXPECT_EQ(20ll, pInHwInfo.capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
} }
DG2TEST_F(Dg2ProductHelperLinux, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned) {
EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported());
}

View File

@@ -1,5 +1,5 @@
# #
# Copyright (C) 2023 Intel Corporation # Copyright (C) 2023-2024 Intel Corporation
# #
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# #
@@ -7,6 +7,7 @@
if(WIN32) if(WIN32)
target_sources(neo_shared_tests PRIVATE target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/${BRANCH_DIR_SUFFIX}product_helper_tests_extra_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/${BRANCH_DIR_SUFFIX}product_helper_tests_extra_dg2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_dg2.cpp
) )
endif() endif()

View File

@@ -0,0 +1,17 @@
/*
* Copyright (C) 2023-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/test_macros/hw_test.h"
#include "shared/test/unit_test/os_interface/windows/product_helper_win_tests.h"
using namespace NEO;
using Dg2ProductHelperWindows = ProductHelperTestWindows;
HWTEST2_F(Dg2ProductHelperWindows, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned, IsDG2) {
EXPECT_FALSE(productHelper->isBufferPoolAllocatorSupported());
}