mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
performance: enable PreferredAllocationMethod by KMD on PTL
Related-To: NEO-10526 Signed-off-by: Radoslaw Jablonski <radoslaw.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
68f9300597
commit
6ead86f0e1
@@ -18,4 +18,10 @@ template <>
|
||||
bool ProductHelperHw<gfxProduct>::isBufferPoolAllocatorSupported() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
std::optional<GfxMemoryAllocationMethod> ProductHelperHw<gfxProduct>::getPreferredAllocationMethod(AllocationType allocationType) const {
|
||||
return GfxMemoryAllocationMethod::allocateByKmd;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
if(TESTS_PTL)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/excludes_xe3_core_ptl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_aot_config_tests_ptl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_tests_ptl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_ptl.cpp
|
||||
|
||||
10
shared/test/unit_test/xe3_core/ptl/excludes_xe3_core_ptl.cpp
Normal file
10
shared/test/unit_test/xe3_core/ptl/excludes_xe3_core_ptl.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/hw_test_base.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenGettingPreferredAllocationMethodThenNoPreferenceIsReturned, IGFX_PTL);
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#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/xe3_core/hw_info_xe3_core.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
@@ -18,6 +19,15 @@ using namespace NEO;
|
||||
|
||||
using PtlProductHelper = ProductHelperTest;
|
||||
|
||||
PTLTEST_F(PtlProductHelper, whenGettingPreferredAllocationMethodThenAllocateByKmdIsReturned) {
|
||||
for (auto i = 0; i < static_cast<int>(AllocationType::count); i++) {
|
||||
auto allocationType = static_cast<AllocationType>(i);
|
||||
auto preferredAllocationMethod = productHelper->getPreferredAllocationMethod(allocationType);
|
||||
EXPECT_TRUE(preferredAllocationMethod.has_value());
|
||||
EXPECT_EQ(GfxMemoryAllocationMethod::allocateByKmd, preferredAllocationMethod.value());
|
||||
}
|
||||
}
|
||||
|
||||
PTLTEST_F(PtlProductHelper, givenCompilerProductHelperWhenGetDefaultHwIpVersionThenCorrectValueIsSet) {
|
||||
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::PTL_H_A0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user