Skip to content

Commit 0e65d3e

Browse files
hw_cmds.h usage refactor
create header with include for DEFAULT_PLATFORM what can be used in some places Signed-off-by: Artur Harasimiuk <[email protected]>
1 parent 70b41cf commit 0e65d3e

File tree

12 files changed

+23
-9
lines changed

12 files changed

+23
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ configure_file(config.h.in ${NEO_BUILD_DIR}/config.h)
840840
configure_file(driver_version.h.in ${NEO_BUILD_DIR}/driver_version.h) # Put Driver version into define
841841
configure_file(lib_names.h.in ${NEO_BUILD_DIR}/lib_names.h)
842842
configure_file(test_files_setup.h.in ${NEO_BUILD_DIR}/test_files_setup.h)
843+
configure_file(hw_cmds_default.h.in ${NEO_BUILD_DIR}/hw_cmds_default.h)
843844

844845
if(BUILD_WITH_L0)
845846
add_subdirectory_unique(level_zero)

cmake/setup_platform_flags.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ if(SUPPORT_GEN12LP)
237237
endif()
238238

239239
if(SUPPORT_XE_HP_CORE)
240-
SET_FLAGS_FOR("XE_HP_CORE")
241240
set(CORE_XE_HP_CORE_REVISIONS 4)
242241
if(TESTS_XE_HP_CORE)
243242
if(TESTS_XE_HP_SDV)

hw_cmds_default.h.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (C) 2018-2022 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#pragma once
9+
10+
#include "shared/source/${MAP_${DEFAULT_SUPPORTED_PLATFORM}_CORE_lower}/hw_cmds_${MAP_${DEFAULT_SUPPORTED_PLATFORM}_lower}.h"

level_zero/core/test/unit_tests/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "level_zero/core/source/compiler_interface/l0_reg_path.h"
2929

3030
#include "gmock/gmock.h"
31-
#include "hw_cmds.h"
31+
#include "hw_cmds_default.h"
3232
#include "igfxfmid.h"
3333

3434
#include <fstream>

opencl/test/unit_test/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "opencl/test/unit_test/ult_config_listener.h"
3333

3434
#include "gmock/gmock.h"
35-
#include "hw_cmds.h"
35+
#include "hw_cmds_default.h"
3636
#include "test_files_setup.h"
3737

3838
#include <algorithm>

opencl/test/unit_test/offline_compiler/ocloc_api_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include "environment.h"
2222
#include "gtest/gtest.h"
23-
#include "hw_cmds.h"
23+
#include "hw_cmds_default.h"
2424

2525
#include <algorithm>
2626
#include <array>

platforms.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ macro(SET_FLAGS_FOR CORE_TYPE)
154154
set(TESTS_${CORE_TYPE} TRUE CACHE BOOL "Build ULTs for ${CORE_TYPE} devices" FORCE)
155155
endif()
156156
endif()
157+
string(TOLOWER ${CORE_TYPE} MAP_${SKU_NAME}_CORE_lower)
158+
string(TOLOWER ${SKU_NAME} MAP_${SKU_NAME}_lower)
159+
set(MAP_${SKU_NAME}_CORE_lower "${CORE_PREFIX}${MAP_${SKU_NAME}_CORE_lower}" CACHE STRING "Core name for SKU" FORCE)
160+
set(MAP_${SKU_NAME}_lower ${MAP_${SKU_NAME}_lower} CACHE STRING "SKU in lower case" FORCE)
157161
endforeach()
158162

159163
set(SUPPORT_${CORE_TYPE} ${SUPPORT_GEN_DEFAULT} CACHE BOOL "Support ${CORE_TYPE} devices")

shared/source/dll/get_devices.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "shared/source/execution_environment/execution_environment.h"
1010
#include "shared/source/execution_environment/root_device_environment.h"
1111

12-
#include "hw_cmds.h"
12+
#include "hw_cmds_default.h"
1313

1414
namespace NEO {
1515

shared/source/xe_hp_core/hw_cmds.h

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

88
#pragma once
99
#ifdef SUPPORT_XE_HP_SDV
10-
#include "hw_cmds_xehp.h"
10+
#include "hw_cmds_xe_hp_sdv.h"
1111
#endif
File renamed without changes.

0 commit comments

Comments
 (0)