diff --git a/opencl/test/unit_test/xe_hpc_core/CMakeLists.txt b/opencl/test/unit_test/xe_hpc_core/CMakeLists.txt index 96a6dcdd9b..bc7a46abc6 100644 --- a/opencl/test/unit_test/xe_hpc_core/CMakeLists.txt +++ b/opencl/test/unit_test/xe_hpc_core/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -14,17 +14,13 @@ if(TESTS_XE_HPC_CORE) ${IGDRCL_SRCS_tests_xe_hpc_core_excludes} ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/built_in_xe_hpc_core_tests_ocl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_tests_xe_hpc_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_cmds_programming_xe_hpc_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/copy_engine_tests_xe_hpc_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_xe_hpc_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_walker_tests_xe_hpc_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_tests_xe_hpc_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_xe_hpc_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_xe_hpc_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_xe_hpc_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_sample_xe_hpc_core.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_xe_hpc_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/api_tests_xe_hpc_core.cpp ) diff --git a/shared/test/unit_test/xe_hpc_core/CMakeLists.txt b/shared/test/unit_test/xe_hpc_core/CMakeLists.txt index 4e2b387b26..f72774989d 100644 --- a/shared/test/unit_test/xe_hpc_core/CMakeLists.txt +++ b/shared/test/unit_test/xe_hpc_core/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -8,8 +8,12 @@ if(TESTS_XE_HPC_CORE) set(NEO_SHARED_tests_xe_hpc_core ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_2_tests_xe_hpc_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_tests_xe_hpc_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_walker_tests_xe_hpc_core.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hpc_core_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_xe_hpc_core_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_xe_hpc_core.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_sample_xe_hpc_core.cpp ) if(DEFINED AUB_STREAM_PROJECT_NAME) diff --git a/opencl/test/unit_test/xe_hpc_core/cmd_parse_tests_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/cmd_parse_tests_xe_hpc_core.cpp similarity index 94% rename from opencl/test/unit_test/xe_hpc_core/cmd_parse_tests_xe_hpc_core.cpp rename to shared/test/unit_test/xe_hpc_core/cmd_parse_tests_xe_hpc_core.cpp index 261fbea0b9..b639164554 100644 --- a/opencl/test/unit_test/xe_hpc_core/cmd_parse_tests_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/cmd_parse_tests_xe_hpc_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,8 +9,6 @@ #include "shared/test/common/cmd_parse/hw_parse.h" #include "shared/test/common/test_macros/test.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - using namespace NEO; using CmdParseTestsXeHpcCore = ::testing::Test; diff --git a/opencl/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp similarity index 87% rename from opencl/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp rename to shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp index ba8db82851..e7f0218ef9 100644 --- a/opencl/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,8 +12,6 @@ #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/test_macros/test.h" -#include "opencl/test/unit_test/mocks/mock_platform.h" - using namespace NEO; using WalkerDispatchTestsXeHpcCore = ::testing::Test; @@ -69,12 +67,9 @@ XE_HPC_CORETEST_F(WalkerDispatchTestsXeHpcCore, givenPvcWhenEncodeAdditionalWalk XE_HPC_CORETEST_F(WalkerDispatchTestsXeHpcCore, givenPvcXtTemporaryWhenEncodeAdditionalWalkerFieldsIsCalledThenComputeDispatchAllIsCorrectlySet) { using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER; - DebugManagerStateRestore debugRestorer; - DebugManager.flags.ForceDeviceId.set("0x0BE5"); - ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); - DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(*executionEnvironment); - auto hwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo(); + auto hwInfo = *defaultHwInfo; + hwInfo.platform.usDeviceID = 0x0BE5; auto walkerCmd = FamilyType::cmdInitGpgpuWalker; { diff --git a/opencl/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp similarity index 100% rename from opencl/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp rename to shared/test/unit_test/xe_hpc_core/test_preamble_xe_hpc_core.cpp diff --git a/opencl/test/unit_test/xe_hpc_core/test_sample_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_sample_xe_hpc_core.cpp similarity index 68% rename from opencl/test/unit_test/xe_hpc_core/test_sample_xe_hpc_core.cpp rename to shared/test/unit_test/xe_hpc_core/test_sample_xe_hpc_core.cpp index 90f7b022e6..279cc09d56 100644 --- a/opencl/test/unit_test/xe_hpc_core/test_sample_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/test_sample_xe_hpc_core.cpp @@ -1,23 +1,22 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/test/common/fixtures/device_fixture.h" #include "shared/test/common/test_macros/test.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" - using namespace NEO; -using PvcOnlyTest = Test; +using PvcOnlyTest = Test; PVCTEST_F(PvcOnlyTest, WhenGettingHardwareInfoThenPvcIsReturned) { EXPECT_EQ(IGFX_PVC, pDevice->getHardwareInfo().platform.eProductFamily); } -using XeHpcCoreOnlyTest = Test; +using XeHpcCoreOnlyTest = Test; XE_HPC_CORETEST_F(XeHpcCoreOnlyTest, WhenGettingRenderCoreFamilyThenOnlyHpcCoreIsReturned) { EXPECT_EQ(IGFX_XE_HPC_CORE, pDevice->getRenderCoreFamily());