refactor: Move MTL specific definition of CompilerProductHelper to Xe Lpg
Related-To: NEO-8187 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
453d01efb2
commit
381d7d7a02
|
@ -42,7 +42,7 @@ components:
|
|||
dest_dir: kernels_bin
|
||||
type: git
|
||||
branch: kernels_bin
|
||||
revision: 2111-888
|
||||
revision: 2111-892
|
||||
kmdaf:
|
||||
branch: kmdaf
|
||||
dest_dir: kmdaf
|
||||
|
|
|
@ -5,26 +5,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/compiler_product_helper_base.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_mtl_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
constexpr auto gfxProduct = IGFX_METEORLAKE;
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<gfxProduct>::getDefaultHwIpVersion() const {
|
||||
return AOT::MTL_M_A0;
|
||||
}
|
||||
#include "shared/source/xe_hpg_core/xe_lpg/compiler_product_helper_xe_lpg.inl"
|
||||
|
||||
static EnableCompilerProductHelper<gfxProduct> enableCompilerProductHelperMTL;
|
||||
|
||||
} // namespace NEO
|
||||
static NEO::EnableCompilerProductHelper<gfxProduct> enableCompilerProductHelperMTL;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
set_property(GLOBAL APPEND PROPERTY NEO_CORE_HELPERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_xe_lpg.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_ids_configs_xe_lpg.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/os_agnostic_product_helper_xe_lpg.inl
|
||||
)
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/compiler_product_helper_base.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_mtl_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<gfxProduct>::getDefaultHwIpVersion() const {
|
||||
return AOT::MTL_M_A0;
|
||||
}
|
||||
} // namespace NEO
|
|
@ -340,7 +340,7 @@ HWTEST_F(ProductHelperTest, WhenCheckAssignEngineRoundRobinSupportedThenReturnFa
|
|||
EXPECT_FALSE(productHelper->isAssignEngineRoundRobinSupported());
|
||||
}
|
||||
|
||||
HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned) {
|
||||
HWTEST2_F(ProductHelperTest, givenProductHelperWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned, IsNotXeHpgOrXeHpcCore) {
|
||||
|
||||
auto isRcs = false;
|
||||
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(pInHwInfo, isRcs, releaseHelper);
|
||||
|
|
|
@ -38,7 +38,6 @@ HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenGetThreadEuRatio
|
|||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenVariousValuesWhenConvertingHwRevIdAndSteppingThenConversionIsCorrect, IGFX_XE_HPC_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenCallingGetDeviceMemoryNameThenDdrIsReturned, IGFX_XE_HPC_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenHardwareInfoWhenCallingIsMaxThreadsForWorkgroupWARequiredThenFalseIsReturned, IGFX_XE_HPC_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned, IGFX_XE_HPC_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfTile64With3DSurfaceOnBCSIsSupportedThenTrueIsReturned, IGFX_XE_HPC_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsPrefetcherDisablingInDirectSubmissionRequiredThenTrueIsReturned, IGFX_XE_HPC_CORE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperAndKernelBinaryFormatsWhenCheckingIsDetectIndirectAccessInKernelSupportedThenCorrectValueIsReturned, IGFX_XE_HPC_CORE);
|
||||
|
|
|
@ -13,7 +13,6 @@ HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenHardwareInfoWhenCallingIsMaxThrea
|
|||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedForDefaultEngineTypeAdjustmentThenFalseIsReturned, IGFX_DG2);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfAllocationSizeAdjustmentIsRequiredThenFalseIsReturned, IGFX_DG2);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPrefetchDisablingIsRequiredThenFalseIsReturned, IGFX_DG2);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned, IGFX_DG2);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfTile64With3DSurfaceOnBCSIsSupportedThenTrueIsReturned, IGFX_DG2);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, WhenAllowRenderCompressionIsCalledThenTrueIsReturned, IGFX_DG2);
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenConvertingTimestampsToCsDomainThenNothingIsChanged, IGFX_DG2);
|
||||
|
|
|
@ -14,7 +14,6 @@ if(TESTS_MTL)
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/ail_tests_mtl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/excludes_xe_hpg_core_mtl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_aot_config_tests_mtl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_mtl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_config_helper_tests_mtl.cpp
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "shared/test/common/test_macros/hw_test_base.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned, IGFX_METEORLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(CommandEncodeStatesImageTest, giveNumSamplersOneWhenDispatchKernelThensamplerStateWasCopied_SamplerSupportedMatcher, IGFX_METEORLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(CommandEncoderTests, givenRequiredWorkGroupOrderWhenCallAdjustWalkOrderThenWalkerIsNotChanged_IsAtMostXeHpcCore, IGFX_METEORLAKE);
|
||||
HWTEST_EXCLUDE_PRODUCT(ComputeModeRequirements, givenCoherencyWithoutSharedHandlesWhenComputeModeIsProgrammedThenCorrectCommandsAreAdded_ForceNonCoherentSupportedMatcher, IGFX_METEORLAKE);
|
||||
|
|
|
@ -5,23 +5,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/unit_test/os_interface/product_helper_tests.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using MtlProductHelper = ProductHelperTest;
|
||||
|
||||
MTLTEST_F(MtlProductHelper, givenCompilerProductHelperWhenGetDefaultHwIpVersionThenCorrectValueIsSet) {
|
||||
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::MTL_M_A0);
|
||||
}
|
||||
|
||||
MTLTEST_F(MtlProductHelper, givenProductHelperWhenCheckDirectSubmissionSupportedThenTrueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->isDirectSubmissionSupported(*defaultHwInfo));
|
||||
}
|
|
@ -320,3 +320,9 @@ HWTEST2_F(XeLpgProductHelperTests, whenSetForceNonCoherentThenNothingChanged, Is
|
|||
EXPECT_EQ(FORCE_NON_COHERENT::FORCE_NON_COHERENT_FORCE_DISABLED, stateComputeMode.getForceNonCoherent());
|
||||
EXPECT_EQ(0u, stateComputeMode.getMaskBits());
|
||||
}
|
||||
|
||||
HWTEST2_F(XeLpgProductHelperTests, givenCompilerProductHelperWhenGetDefaultHwIpVersionThenCorrectValueIsSet, IsXeLpg) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::MTL_M_A0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue