Skip to content

Commit 91dfa5c

Browse files
Initial DG2 support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
1 parent b8aa287 commit 91dfa5c

File tree

78 files changed

+9884
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+9884
-1
lines changed

cmake/fill_gens.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ list(APPEND ALL_GEN_TYPES "GEN9")
99
list(APPEND ALL_GEN_TYPES "GEN11")
1010
list(APPEND ALL_GEN_TYPES "GEN12LP")
1111
list(APPEND ALL_GEN_TYPES "XE_HP_CORE")
12-
list(APPEND XEHP_AND_LATER_GENS "XE_HP_CORE")
12+
list(APPEND ALL_GEN_TYPES "XE_HPG_CORE")
13+
list(APPEND XEHP_AND_LATER_GENS "XE_HP_CORE" "XE_HPG_CORE")
14+
list(APPEND DG2_AND_LATER_GENS "XE_HPG_CORE")

cmake/setup_platform_flags.cmake

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ foreach(GEN_TYPE ${DEVICE_ENQUEUE_DISABLED_GENS})
2525
set(SUPPORT_DEVICE_ENQUEUE_${GEN_TYPE} FALSE CACHE BOOL "Disabled support ${GEN_TYPE} for device side enqueue" FORCE)
2626
endforeach()
2727

28+
foreach(GEN_TYPE ${DG2_AND_LATER_GENS})
29+
if(TESTS_${GEN_TYPE})
30+
set(TESTS_DG2_AND_LATER 1)
31+
endif()
32+
if(SUPPORT_${GEN_TYPE})
33+
set(SUPPORT_DG2_AND_LATER 1)
34+
endif()
35+
endforeach()
36+
2837
# Add supported and tested platforms
2938
if(SUPPORT_GEN8)
3039
set(CORE_GEN8_REVISIONS 0)
@@ -234,3 +243,21 @@ if(SUPPORT_XE_HP_CORE)
234243
endif()
235244
endif()
236245
endif()
246+
247+
if(SUPPORT_XE_HPG_CORE)
248+
set(CORE_XE_HPG_CORE_REVISIONS 0)
249+
if(TESTS_XE_HPG_CORE)
250+
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "XE_HPG_CORE" "XE_HPG_COREFamily")
251+
endif()
252+
if(SUPPORT_DG2)
253+
set(DG2_XE_HPG_CORE_REVISIONS 0)
254+
ADD_PRODUCT("SUPPORTED" "DG2" "IGFX_DG2")
255+
ADD_PLATFORM_FOR_GEN("SUPPORTED" "XE_HPG_CORE" "DG2" "DG2")
256+
ADD_PLATFORM_FOR_GEN("SUPPORTED_AUX_TRANSLATION" "XE_HPG_CORE" "DG2" "DG2")
257+
ADD_PLATFORM_FOR_GEN("SUPPORTED_IMAGES" "XE_HPG_CORE" "DG2" "DG2")
258+
if(TESTS_DG2)
259+
ADD_ITEM_FOR_GEN("PLATFORMS" "TESTED" "XE_HPG_CORE" "DG2")
260+
ADD_PRODUCT("TESTED" "DG2" "IGFX_DG2")
261+
endif()
262+
endif()
263+
endif()
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Copyright (C) 2021 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
7+
if(SUPPORT_XE_HPG_CORE)
8+
set(HW_SOURCES_XE_HPG_CORE
9+
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
10+
${CMAKE_CURRENT_SOURCE_DIR}/debugger_xe_hpg_core.cpp
11+
${CMAKE_CURRENT_SOURCE_DIR}/image_xe_hpg_core.inl
12+
${CMAKE_CURRENT_SOURCE_DIR}/sampler_xe_hpg_core.inl
13+
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_xe_hpg_core.cpp
14+
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_xe_hpg_core.cpp
15+
)
16+
17+
add_subdirectories()
18+
19+
target_sources(${L0_STATIC_LIB_NAME} PRIVATE ${HW_SOURCES_XE_HPG_CORE})
20+
set_property(GLOBAL PROPERTY L0_HW_SOURCES_XE_HPG_CORE ${HW_SOURCES_XE_HPG_CORE})
21+
endif()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (C) 2021 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "level_zero/core/source/debugger/debugger_l0.inl"
9+
10+
namespace NEO {
11+
struct XE_HPG_COREFamily;
12+
using GfxFamily = XE_HPG_COREFamily;
13+
14+
} // namespace NEO
15+
16+
namespace L0 {
17+
template class DebuggerL0Hw<NEO::GfxFamily>;
18+
DebuggerL0PopulateFactory<IGFX_XE_HPG_CORE, NEO::GfxFamily> debuggerXeHpgCore;
19+
} // namespace L0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright (C) 2021 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
7+
if(SUPPORT_DG2)
8+
set(HW_SOURCES_XE_HPG_CORE
9+
${HW_SOURCES_XE_HPG_CORE}
10+
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
11+
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_dg2.cpp
12+
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_dg2.h
13+
${CMAKE_CURRENT_SOURCE_DIR}/cmdqueue_dg2.cpp
14+
${CMAKE_CURRENT_SOURCE_DIR}/kernel_dg2.cpp
15+
${CMAKE_CURRENT_SOURCE_DIR}/image_dg2.cpp
16+
${CMAKE_CURRENT_SOURCE_DIR}/sampler_dg2.cpp
17+
PARENT_SCOPE
18+
)
19+
endif()
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (C) 2021 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "cmdlist_dg2.h"
9+
10+
#include "level_zero/core/source/cmdlist/cmdlist_hw.inl"
11+
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl"
12+
#include "level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl"
13+
14+
#include "cmdlist_extended.inl"
15+
16+
namespace L0 {
17+
18+
template struct CommandListCoreFamily<IGFX_XE_HPG_CORE>;
19+
20+
static CommandListPopulateFactory<IGFX_DG2, CommandListProductFamily<IGFX_DG2>>
21+
populateDG2;
22+
23+
static CommandListImmediatePopulateFactory<IGFX_DG2, CommandListImmediateProductFamily<IGFX_DG2>>
24+
populateDG2Immediate;
25+
26+
} // namespace L0
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (C) 2021 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "level_zero/core/source/cmdlist/cmdlist_hw.h"
9+
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"
10+
11+
namespace L0 {
12+
template <>
13+
struct CommandListImmediateProductFamily<IGFX_DG2> : public CommandListCoreFamilyImmediate<IGFX_XE_HPG_CORE> {
14+
using CommandListCoreFamilyImmediate::CommandListCoreFamilyImmediate;
15+
};
16+
template <>
17+
struct CommandListProductFamily<IGFX_DG2> : public CommandListCoreFamily<IGFX_XE_HPG_CORE> {
18+
using CommandListCoreFamily::CommandListCoreFamily;
19+
void clearComputeModePropertiesIfNeeded(bool requiresCoherency, uint32_t numGrfRequired, uint32_t threadArbitrationPolicy) override {
20+
finalStreamState.stateComputeMode = {};
21+
finalStreamState.stateComputeMode.setProperties(requiresCoherency, numGrfRequired, threadArbitrationPolicy);
22+
}
23+
};
24+
25+
} // namespace L0
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (C) 2021 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "shared/source/xe_hpg_core/hw_cmds.h"
9+
#include "shared/source/xe_hpg_core/hw_info.h"
10+
11+
#include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl"
12+
#include "level_zero/core/source/cmdqueue/cmdqueue_xe_hp_core_and_later.inl"
13+
14+
#include "cmdqueue_extended.inl"
15+
16+
namespace L0 {
17+
template struct CommandQueueHw<IGFX_XE_HPG_CORE>;
18+
static CommandQueuePopulateFactory<IGFX_DG2, CommandQueueHw<IGFX_XE_HPG_CORE>>
19+
populateDG2;
20+
21+
} // namespace L0
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (C) 2021 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "level_zero/core/source/xe_hpg_core/image_xe_hpg_core.inl"
9+
10+
namespace L0 {
11+
12+
template <>
13+
struct ImageProductFamily<IGFX_DG2> : public ImageCoreFamily<IGFX_XE_HPG_CORE> {
14+
using ImageCoreFamily::ImageCoreFamily;
15+
16+
ze_result_t initialize(Device *device, const ze_image_desc_t *desc) override {
17+
return ImageCoreFamily<IGFX_XE_HPG_CORE>::initialize(device, desc);
18+
};
19+
};
20+
21+
static ImagePopulateFactory<IGFX_DG2, ImageProductFamily<IGFX_DG2>> populateDG2;
22+
23+
} // namespace L0
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (C) 2021 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "level_zero/core/source/kernel/kernel_hw.h"
9+
10+
namespace L0 {
11+
12+
static KernelPopulateFactory<IGFX_DG2, KernelHw<IGFX_XE_HPG_CORE>> populateDG2;
13+
14+
} // namespace L0

0 commit comments

Comments
 (0)