Move gen9 preamble tests to gen9 directory

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2022-01-19 20:11:40 +00:00
committed by Compute-Runtime-Automation
parent feafc4b173
commit af8f712010
4 changed files with 19 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2019-2021 Intel Corporation
# Copyright (C) 2019-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -13,7 +13,6 @@ if(TESTS_GEN9)
${CMAKE_CURRENT_SOURCE_DIR}/test_traits_gen9.h
)
set_property(GLOBAL PROPERTY NEO_CORE_TESTS_GEN9 ${NEO_CORE_TESTS_GEN9})
add_subdirectories()
target_sources(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt

View File

@@ -1,12 +0,0 @@
#
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
set(NEO_CORE_TESTS_GEN9_SKL
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_skl.cpp
)
set_property(GLOBAL PROPERTY NEO_CORE_TESTS_GEN9_SKL ${NEO_CORE_TESTS_GEN9_SKL})
add_subdirectories()

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2021 Intel Corporation
# Copyright (C) 2021-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -8,6 +8,7 @@ if(TESTS_GEN9)
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen9_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen9.cpp
)
add_subdirectories()
endif()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -16,16 +16,16 @@
using namespace NEO;
typedef PreambleFixture SklSlm;
using Gen9Slm = PreambleFixture;
SKLTEST_F(SklSlm, WhenL3ConfigIsDispatchedThenProperRegisterAddressAndValueAreProgrammed) {
typedef SKLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
GEN9TEST_F(Gen9Slm, WhenL3ConfigIsDispatchedThenProperRegisterAddressAndValueAreProgrammed) {
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
LinearStream &cs = linearStream;
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, true);
PreambleHelper<SKLFamily>::programL3(&cs, l3Config);
PreambleHelper<FamilyType>::programL3(&cs, l3Config);
parseCommands<SKLFamily>(cs);
parseCommands<FamilyType>(cs);
auto itorLRI = find<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), itorLRI);
@@ -36,9 +36,9 @@ SKLTEST_F(SklSlm, WhenL3ConfigIsDispatchedThenProperRegisterAddressAndValueArePr
EXPECT_EQ(1u, lri.getDataDword() & 1);
}
typedef PreambleFixture Gen9L3Config;
using Gen9L3Config = PreambleFixture;
SKLTEST_F(Gen9L3Config, GivenNoSlmWhenProgrammingL3ThenProgrammingIsCorrect) {
GEN9TEST_F(Gen9L3Config, GivenNoSlmWhenProgrammingL3ThenProgrammingIsCorrect) {
bool slmUsed = false;
uint32_t l3Config = 0;
@@ -54,7 +54,7 @@ SKLTEST_F(Gen9L3Config, GivenNoSlmWhenProgrammingL3ThenProgrammingIsCorrect) {
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
}
SKLTEST_F(Gen9L3Config, GivenSlmWhenProgrammingL3ThenProgrammingIsCorrect) {
GEN9TEST_F(Gen9L3Config, GivenSlmWhenProgrammingL3ThenProgrammingIsCorrect) {
bool slmUsed = true;
uint32_t l3Config = 0;
@@ -70,13 +70,13 @@ SKLTEST_F(Gen9L3Config, GivenSlmWhenProgrammingL3ThenProgrammingIsCorrect) {
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
}
typedef PreambleFixture ThreadArbitration;
SKLTEST_F(ThreadArbitration, GivenDefaultWhenProgrammingPreambleThenArbitrationPolicyIsRoundRobin) {
EXPECT_EQ(ThreadArbitrationPolicy::RoundRobin, HwHelperHw<SKLFamily>::get().getDefaultThreadArbitrationPolicy());
using ThreadArbitration = PreambleFixture;
GEN9TEST_F(ThreadArbitration, GivenDefaultWhenProgrammingPreambleThenArbitrationPolicyIsRoundRobin) {
EXPECT_EQ(ThreadArbitrationPolicy::RoundRobin, HwHelperHw<FamilyType>::get().getDefaultThreadArbitrationPolicy());
}
SKLTEST_F(ThreadArbitration, whenGetSupportedThreadArbitrationPoliciesIsCalledThenAgeBasedAndRoundRobinAreReturned) {
auto supportedPolicies = PreambleHelper<SKLFamily>::getSupportedThreadArbitrationPolicies();
GEN9TEST_F(ThreadArbitration, whenGetSupportedThreadArbitrationPoliciesIsCalledThenAgeBasedAndRoundRobinAreReturned) {
auto supportedPolicies = PreambleHelper<FamilyType>::getSupportedThreadArbitrationPolicies();
EXPECT_EQ(2u, supportedPolicies.size());
EXPECT_NE(supportedPolicies.end(), std::find(supportedPolicies.begin(),
@@ -88,7 +88,7 @@ SKLTEST_F(ThreadArbitration, whenGetSupportedThreadArbitrationPoliciesIsCalledTh
}
GEN9TEST_F(PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgrammingIsCorrect) {
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
testWaTable->flags.waSendMIFLUSHBeforeVFE = 0;
LinearStream &cs = linearStream;
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute);
@@ -108,7 +108,7 @@ GEN9TEST_F(PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgrammingIsC
}
GEN9TEST_F(PreambleVfeState, GivenWaOnWhenProgrammingVfeStateThenProgrammingIsCorrect) {
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
testWaTable->flags.waSendMIFLUSHBeforeVFE = 1;
LinearStream &cs = linearStream;
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute);