mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
performance: enable usm reuse, BMG
Related-To: NEO-6893, GSD-11387 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
259883c9c7
commit
a5f589265d
@@ -56,4 +56,14 @@ bool ProductHelperHw<gfxProduct>::checkBcsForDirectSubmissionStop() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isDeviceUsmAllocationReuseSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isHostUsmAllocationReuseSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -827,19 +827,6 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsUsmAllocationReuseS
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsUsmAllocationReuseSupportedThenCorrectValueIsReturned, IsXe2HpgCore) {
|
||||
{
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::OCL);
|
||||
EXPECT_TRUE(productHelper->isHostUsmAllocationReuseSupported());
|
||||
EXPECT_TRUE(productHelper->isDeviceUsmAllocationReuseSupported());
|
||||
}
|
||||
{
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::L0);
|
||||
EXPECT_FALSE(productHelper->isHostUsmAllocationReuseSupported());
|
||||
EXPECT_FALSE(productHelper->isDeviceUsmAllocationReuseSupported());
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckingIsUnlockingLockedPtrNecessaryThenReturnFalse) {
|
||||
EXPECT_FALSE(productHelper->isUnlockingLockedPtrNecessary(pInHwInfo));
|
||||
}
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
#include "shared/source/helpers/api_specific_config.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/memory_manager/allocation_type.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/xe2_hpg_core/hw_cmds_bmg.h"
|
||||
#include "shared/source/xe2_hpg_core/hw_info_xe2_hpg_core.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
#include "shared/test/common/mocks/mock_release_helper.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
@@ -20,6 +22,9 @@
|
||||
#include "aubstream/product_family.h"
|
||||
#include "neo_aot_platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
extern ApiSpecificConfig::ApiType apiTypeForUlts;
|
||||
}
|
||||
using namespace NEO;
|
||||
|
||||
using BmgProductHelper = ProductHelperTest;
|
||||
@@ -132,3 +137,29 @@ BMGTEST_F(BmgProductHelper, whenAdjustScratchSizeThenSizeIsDoubled) {
|
||||
BMGTEST_F(BmgProductHelper, givenProductHelperWhenCallDeferMOCSToPatOnWSLThenTrueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->deferMOCSToPatIndex(true));
|
||||
}
|
||||
|
||||
BMGTEST_F(BmgProductHelper, givenProductHelperWhenCheckingIsUsmPoolAllocatorSupportedThenCorrectValueIsReturned) {
|
||||
{
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::OCL);
|
||||
EXPECT_TRUE(productHelper->isHostUsmPoolAllocatorSupported());
|
||||
EXPECT_TRUE(productHelper->isDeviceUsmPoolAllocatorSupported());
|
||||
}
|
||||
{
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::L0);
|
||||
EXPECT_TRUE(productHelper->isHostUsmPoolAllocatorSupported());
|
||||
EXPECT_TRUE(productHelper->isDeviceUsmPoolAllocatorSupported());
|
||||
}
|
||||
}
|
||||
|
||||
BMGTEST_F(BmgProductHelper, givenProductHelperWhenCheckingIsUsmReuseSupportedThenCorrectValueIsReturned) {
|
||||
{
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::OCL);
|
||||
EXPECT_TRUE(productHelper->isHostUsmAllocationReuseSupported());
|
||||
EXPECT_TRUE(productHelper->isDeviceUsmAllocationReuseSupported());
|
||||
}
|
||||
{
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::L0);
|
||||
EXPECT_TRUE(productHelper->isHostUsmAllocationReuseSupported());
|
||||
EXPECT_TRUE(productHelper->isDeviceUsmAllocationReuseSupported());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,6 +140,19 @@ LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckingIsBufferPoolAllocatorS
|
||||
EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported());
|
||||
}
|
||||
|
||||
LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckingIsUsmAllocationReuseSupportedThenCorrectValueIsReturned) {
|
||||
{
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::OCL);
|
||||
EXPECT_TRUE(productHelper->isHostUsmAllocationReuseSupported());
|
||||
EXPECT_TRUE(productHelper->isDeviceUsmAllocationReuseSupported());
|
||||
}
|
||||
{
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::L0);
|
||||
EXPECT_FALSE(productHelper->isHostUsmAllocationReuseSupported());
|
||||
EXPECT_FALSE(productHelper->isDeviceUsmAllocationReuseSupported());
|
||||
}
|
||||
}
|
||||
|
||||
LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckingIsHostDeviceUsmPoolAllocatorSupportedThenCorrectValueIsReturned) {
|
||||
{
|
||||
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::OCL);
|
||||
|
||||
Reference in New Issue
Block a user