From fce659d8c8958b61500c71548f1467b91d6be5ca Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Thu, 31 Aug 2023 12:50:16 +0000 Subject: [PATCH] test: unify product specific L0 cmdlist tests Signed-off-by: Mateusz Jablonski --- .../test_cmdqueue_enqueue_cmdlist_2.cpp | 15 ++++++- .../unit_tests/xe_hpg_core/mtl/CMakeLists.txt | 12 ------ .../xe_hpg_core/mtl/test_cmdlist_mtl.cpp | 40 ------------------- 3 files changed, 13 insertions(+), 54 deletions(-) delete mode 100644 level_zero/core/test/unit_tests/xe_hpg_core/mtl/CMakeLists.txt delete mode 100644 level_zero/core/test/unit_tests/xe_hpg_core/mtl/test_cmdlist_mtl.cpp diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist_2.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist_2.cpp index bd28c6d7d0..ae1f0cd193 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist_2.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist_2.cpp @@ -731,7 +731,12 @@ HWTEST_F(PauseOnGpuWithImmediateCommandListTests, givenPauseModeSetToBeforeAndAf using CmdListPipelineSelectStateTest = Test; -using SystolicSupport = IsAnyProducts; +struct SystolicSupport { + template + static constexpr bool isMatched() { + return IsAnyProducts::isMatched() || IsXeHpgCore::isMatched(); + } +}; HWTEST2_F(CmdListPipelineSelectStateTest, givenAppendSystolicKernelToCommandListWhenExecutingCommandListThenPipelineSelectStateIsTrackedCorrectly, SystolicSupport) { @@ -763,7 +768,13 @@ HWTEST2_F(CmdListThreadArbitrationTest, using CmdListLargeGrfTest = Test; -using LargeGrfSupport = IsAnyProducts; +struct LargeGrfSupport { + template + static constexpr bool isMatched() { + return IsXeHpgCore::isMatched() || IsPVC::isMatched(); + } +}; + HWTEST2_F(CmdListLargeGrfTest, givenAppendLargeGrfKernelToCommandListWhenExecutingCommandListThenStateComputeModeStateIsTrackedCorrectly, LargeGrfSupport) { testBody(); diff --git a/level_zero/core/test/unit_tests/xe_hpg_core/mtl/CMakeLists.txt b/level_zero/core/test/unit_tests/xe_hpg_core/mtl/CMakeLists.txt deleted file mode 100644 index 74e468d74e..0000000000 --- a/level_zero/core/test/unit_tests/xe_hpg_core/mtl/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2022-2023 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_MTL) - target_sources(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_mtl.cpp - ) -endif() diff --git a/level_zero/core/test/unit_tests/xe_hpg_core/mtl/test_cmdlist_mtl.cpp b/level_zero/core/test/unit_tests/xe_hpg_core/mtl/test_cmdlist_mtl.cpp deleted file mode 100644 index cb88ef523b..0000000000 --- a/level_zero/core/test/unit_tests/xe_hpg_core/mtl/test_cmdlist_mtl.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/test/common/test_macros/hw_test.h" - -#include "level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.inl" - -namespace L0 { -namespace ult { - -using CmdListPipelineSelectStateTestMtl = Test; - -HWTEST2_F(CmdListPipelineSelectStateTestMtl, - givenAppendSystolicKernelToCommandListWhenExecutingCommandListThenPipelineSelectStateIsTrackedCorrectly, IsMTL) { - testBody(); -} - -HWTEST2_F(CmdListPipelineSelectStateTestMtl, - givenCmdQueueAndImmediateCmdListUseSameCsrWhenAppendingSystolicKernelOnBothRegularFirstThenPipelineSelectStateIsNotChanged, IsMTL) { - testBodyShareStateRegularImmediate(); -} - -HWTEST2_F(CmdListPipelineSelectStateTestMtl, - givenCmdQueueAndImmediateCmdListUseSameCsrWhenAppendingSystolicKernelOnBothImmediateFirstThenPipelineSelectStateIsNotChanged, IsMTL) { - testBodyShareStateImmediateRegular(); -} - -using CmdListLargeGrfTestMtl = Test; - -HWTEST2_F(CmdListLargeGrfTestMtl, - givenAppendLargeGrfKernelToCommandListWhenExecutingCommandListThenStateComputeModeStateIsTrackedCorrectly, IsMTL) { - testBody(); -} - -} // namespace ult -} // namespace L0