From db9559c8980d6852cb2eaf08cce8b8d5ad2f828d Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Thu, 11 May 2023 19:45:10 +0000 Subject: [PATCH] test: add meteorlake command list unit tests Signed-off-by: Zbigniew Zdanowicz --- .../unit_tests/xe_hpg_core/mtl/CMakeLists.txt | 3 +- .../xe_hpg_core/mtl/test_cmdlist_mtl.cpp | 40 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create 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/xe_hpg_core/mtl/CMakeLists.txt b/level_zero/core/test/unit_tests/xe_hpg_core/mtl/CMakeLists.txt index eb18e1a86b..fe6229d8ae 100644 --- 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 @@ -1,5 +1,5 @@ # -# Copyright (C) 2022 Intel Corporation +# Copyright (C) 2022-2023 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -7,6 +7,7 @@ if(TESTS_MTL) target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_mtl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_sampler_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 new file mode 100644 index 0000000000..cb88ef523b --- /dev/null +++ b/level_zero/core/test/unit_tests/xe_hpg_core/mtl/test_cmdlist_mtl.cpp @@ -0,0 +1,40 @@ +/* + * 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