Skip to content

Commit fdef257

Browse files
Move some Xe Hpc tests from opencl to shared
Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent bbea52f commit fdef257

File tree

6 files changed

+14
-22
lines changed

6 files changed

+14
-22
lines changed

opencl/test/unit_test/xe_hpc_core/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2021 Intel Corporation
2+
# Copyright (C) 2021-2022 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
@@ -14,17 +14,13 @@ if(TESTS_XE_HPC_CORE)
1414
${IGDRCL_SRCS_tests_xe_hpc_core_excludes}
1515
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
1616
${CMAKE_CURRENT_SOURCE_DIR}/built_in_xe_hpc_core_tests_ocl.cpp
17-
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_tests_xe_hpc_core.cpp
1817
${CMAKE_CURRENT_SOURCE_DIR}/test_cmds_programming_xe_hpc_core.cpp
1918
${CMAKE_CURRENT_SOURCE_DIR}/copy_engine_tests_xe_hpc_core.cpp
2019
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_xe_hpc_core.cpp
21-
${CMAKE_CURRENT_SOURCE_DIR}/dispatch_walker_tests_xe_hpc_core.cpp
2220
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_tests_xe_hpc_core.cpp
2321
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_xe_hpc_core.cpp
2422
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_xe_hpc_core.cpp
2523
${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_xe_hpc_core.cpp
26-
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_xe_hpc_core.cpp
27-
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_xe_hpc_core.cpp
2824
${CMAKE_CURRENT_SOURCE_DIR}/api_tests_xe_hpc_core.cpp
2925
)
3026

shared/test/unit_test/xe_hpc_core/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2021 Intel Corporation
2+
# Copyright (C) 2021-2022 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
@@ -8,8 +8,12 @@ if(TESTS_XE_HPC_CORE)
88
set(NEO_SHARED_tests_xe_hpc_core
99
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
1010
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_2_tests_xe_hpc_core.cpp
11+
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_tests_xe_hpc_core.cpp
12+
${CMAKE_CURRENT_SOURCE_DIR}/dispatch_walker_tests_xe_hpc_core.cpp
1113
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hpc_core_tests.cpp
1214
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_xe_hpc_core_tests.cpp
15+
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_xe_hpc_core.cpp
16+
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_xe_hpc_core.cpp
1317
)
1418

1519
if(DEFINED AUB_STREAM_PROJECT_NAME)

opencl/test/unit_test/xe_hpc_core/cmd_parse_tests_xe_hpc_core.cpp renamed to shared/test/unit_test/xe_hpc_core/cmd_parse_tests_xe_hpc_core.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -9,8 +9,6 @@
99
#include "shared/test/common/cmd_parse/hw_parse.h"
1010
#include "shared/test/common/test_macros/test.h"
1111

12-
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
13-
1412
using namespace NEO;
1513

1614
using CmdParseTestsXeHpcCore = ::testing::Test;

opencl/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp renamed to shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -12,8 +12,6 @@
1212
#include "shared/test/common/helpers/default_hw_info.h"
1313
#include "shared/test/common/test_macros/test.h"
1414

15-
#include "opencl/test/unit_test/mocks/mock_platform.h"
16-
1715
using namespace NEO;
1816

1917
using WalkerDispatchTestsXeHpcCore = ::testing::Test;
@@ -69,12 +67,9 @@ XE_HPC_CORETEST_F(WalkerDispatchTestsXeHpcCore, givenPvcWhenEncodeAdditionalWalk
6967

7068
XE_HPC_CORETEST_F(WalkerDispatchTestsXeHpcCore, givenPvcXtTemporaryWhenEncodeAdditionalWalkerFieldsIsCalledThenComputeDispatchAllIsCorrectlySet) {
7169
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
72-
DebugManagerStateRestore debugRestorer;
73-
DebugManager.flags.ForceDeviceId.set("0x0BE5");
7470

75-
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
76-
DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(*executionEnvironment);
77-
auto hwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
71+
auto hwInfo = *defaultHwInfo;
72+
hwInfo.platform.usDeviceID = 0x0BE5;
7873
auto walkerCmd = FamilyType::cmdInitGpgpuWalker;
7974

8075
{

opencl/test/unit_test/xe_hpc_core/test_sample_xe_hpc_core.cpp renamed to shared/test/unit_test/xe_hpc_core/test_sample_xe_hpc_core.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8+
#include "shared/test/common/fixtures/device_fixture.h"
89
#include "shared/test/common/test_macros/test.h"
910

10-
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
11-
1211
using namespace NEO;
1312

14-
using PvcOnlyTest = Test<ClDeviceFixture>;
13+
using PvcOnlyTest = Test<DeviceFixture>;
1514

1615
PVCTEST_F(PvcOnlyTest, WhenGettingHardwareInfoThenPvcIsReturned) {
1716
EXPECT_EQ(IGFX_PVC, pDevice->getHardwareInfo().platform.eProductFamily);
1817
}
1918

20-
using XeHpcCoreOnlyTest = Test<ClDeviceFixture>;
19+
using XeHpcCoreOnlyTest = Test<DeviceFixture>;
2120

2221
XE_HPC_CORETEST_F(XeHpcCoreOnlyTest, WhenGettingRenderCoreFamilyThenOnlyHpcCoreIsReturned) {
2322
EXPECT_EQ(IGFX_XE_HPC_CORE, pDevice->getRenderCoreFamily());

0 commit comments

Comments
 (0)