Skip to content

Commit ad8e640

Browse files
Reorganize implicit scaling files
Related-To: NEO-6262 Signed-off-by: Zbigniew Zdanowicz <[email protected]>
1 parent a9aa472 commit ad8e640

File tree

7 files changed

+77
-48
lines changed

7 files changed

+77
-48
lines changed

shared/source/command_container/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ if(SUPPORT_XEHP_AND_LATER)
2525
${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_raytracing_xehp_and_later.inl
2626
${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_xehp_and_later.inl
2727
${CMAKE_CURRENT_SOURCE_DIR}/implicit_scaling_xehp_and_later.inl
28+
${CMAKE_CURRENT_SOURCE_DIR}/walker_partition_interface.h
2829
${CMAKE_CURRENT_SOURCE_DIR}/walker_partition_xehp_and_later.h
2930
)
3031
endif()
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (C) 2021 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#pragma once
9+
#include <cstddef>
10+
#include <cstdint>
11+
12+
namespace WalkerPartition {
13+
14+
struct WalkerPartitionArgs {
15+
uint64_t workPartitionAllocationGpuVa = 0;
16+
uint32_t partitionCount = 0;
17+
uint32_t tileCount = 0;
18+
bool emitBatchBufferEnd = false;
19+
bool secondaryBatchBuffer = false;
20+
bool synchronizeBeforeExecution = false;
21+
bool crossTileAtomicSynchronization = false;
22+
bool semaphoreProgrammingRequired = false;
23+
bool staticPartitioning = false;
24+
bool emitSelfCleanup = false;
25+
bool useAtomicsForSelfCleanup = false;
26+
bool initializeWparidRegister = false;
27+
bool emitPipeControlStall = false;
28+
bool preferredStaticPartitioning = false;
29+
};
30+
31+
constexpr uint32_t wparidCCSOffset = 0x221C;
32+
constexpr uint32_t addressOffsetCCSOffset = 0x23B4;
33+
constexpr uint32_t predicationMaskCCSOffset = 0x21FC;
34+
35+
constexpr uint32_t generalPurposeRegister0 = 0x2600;
36+
constexpr uint32_t generalPurposeRegister1 = 0x2608;
37+
constexpr uint32_t generalPurposeRegister2 = 0x2610;
38+
constexpr uint32_t generalPurposeRegister3 = 0x2618;
39+
constexpr uint32_t generalPurposeRegister4 = 0x2620;
40+
constexpr uint32_t generalPurposeRegister5 = 0x2628;
41+
constexpr uint32_t generalPurposeRegister6 = 0x2630;
42+
43+
struct BatchBufferControlData {
44+
uint32_t partitionCount = 0u;
45+
uint32_t tileCount = 0u;
46+
uint32_t inTileCount = 0u;
47+
uint32_t finalSyncTileCount = 0u;
48+
};
49+
static constexpr inline size_t dynamicPartitioningFieldsForCleanupCount = sizeof(BatchBufferControlData) / sizeof(uint32_t) - 1;
50+
51+
struct StaticPartitioningControlSection {
52+
uint32_t synchronizeBeforeWalkerCounter = 0;
53+
uint32_t synchronizeAfterWalkerCounter = 0;
54+
uint32_t finalSyncTileCounter = 0;
55+
};
56+
static constexpr inline size_t staticPartitioningFieldsForCleanupCount = sizeof(StaticPartitioningControlSection) / sizeof(uint32_t) - 1;
57+
} // namespace WalkerPartition

shared/source/command_container/walker_partition_xehp_and_later.h

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#pragma once
99

1010
#include "shared/source/command_container/command_encoder.h"
11+
#include "shared/source/command_container/walker_partition_interface.h"
1112
#include "shared/source/debug_settings/debug_settings_manager.h"
1213
#include "shared/source/helpers/basic_math.h"
1314
#include "shared/source/helpers/hw_helper.h"
@@ -18,23 +19,6 @@
1819

1920
namespace WalkerPartition {
2021

21-
struct WalkerPartitionArgs {
22-
uint64_t workPartitionAllocationGpuVa = 0;
23-
uint32_t partitionCount = 0;
24-
uint32_t tileCount = 0;
25-
bool emitBatchBufferEnd = false;
26-
bool secondaryBatchBuffer = false;
27-
bool synchronizeBeforeExecution = false;
28-
bool crossTileAtomicSynchronization = false;
29-
bool semaphoreProgrammingRequired = false;
30-
bool staticPartitioning = false;
31-
bool emitSelfCleanup = false;
32-
bool useAtomicsForSelfCleanup = false;
33-
bool initializeWparidRegister = false;
34-
bool emitPipeControlStall = false;
35-
bool preferredStaticPartitioning = false;
36-
};
37-
3822
template <typename GfxFamily>
3923
using COMPUTE_WALKER = typename GfxFamily::COMPUTE_WALKER;
4024
template <typename GfxFamily>
@@ -62,26 +46,6 @@ using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
6246
template <typename GfxFamily>
6347
using MI_STORE_DATA_IMM = typename GfxFamily::MI_STORE_DATA_IMM;
6448

65-
constexpr uint32_t wparidCCSOffset = 0x221C;
66-
constexpr uint32_t addressOffsetCCSOffset = 0x23B4;
67-
constexpr uint32_t predicationMaskCCSOffset = 0x21FC;
68-
69-
constexpr uint32_t generalPurposeRegister0 = 0x2600;
70-
constexpr uint32_t generalPurposeRegister1 = 0x2608;
71-
constexpr uint32_t generalPurposeRegister2 = 0x2610;
72-
constexpr uint32_t generalPurposeRegister3 = 0x2618;
73-
constexpr uint32_t generalPurposeRegister4 = 0x2620;
74-
constexpr uint32_t generalPurposeRegister5 = 0x2628;
75-
constexpr uint32_t generalPurposeRegister6 = 0x2630;
76-
77-
struct BatchBufferControlData {
78-
uint32_t partitionCount = 0u;
79-
uint32_t tileCount = 0u;
80-
uint32_t inTileCount = 0u;
81-
uint32_t finalSyncTileCount = 0u;
82-
};
83-
static constexpr inline size_t dynamicPartitioningFieldsForCleanupCount = sizeof(BatchBufferControlData) / sizeof(uint32_t) - 1;
84-
8549
template <typename Command>
8650
Command *putCommand(void *&inputAddress, uint32_t &totalBytesProgrammed) {
8751
totalBytesProgrammed += sizeof(Command);
@@ -631,13 +595,6 @@ void constructDynamicallyPartitionedCommandBuffer(void *cpuPointer,
631595
}
632596
}
633597

634-
struct StaticPartitioningControlSection {
635-
uint32_t synchronizeBeforeWalkerCounter = 0;
636-
uint32_t synchronizeAfterWalkerCounter = 0;
637-
uint32_t finalSyncTileCounter = 0;
638-
};
639-
static constexpr inline size_t staticPartitioningFieldsForCleanupCount = sizeof(StaticPartitioningControlSection) / sizeof(uint32_t) - 1;
640-
641598
template <typename GfxFamily>
642599
uint64_t computeStaticPartitioningControlSectionOffset(WalkerPartitionArgs &args) {
643600
const auto beforeExecutionSyncAtomicSize = args.synchronizeBeforeExecution

shared/source/enable_gens.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ set(CORE_RUNTIME_SRCS_GENX_CPP_BASE
2020
create_device_command_stream_receiver
2121
direct_submission
2222
experimental_command_buffer
23+
implicit_scaling
2324
hw_helper
2425
hw_info
2526
preamble

shared/source/xe_hp_core/command_encoder_xe_hp_core.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#include "shared/source/command_container/command_encoder_raytracing_xehp_and_later.inl"
1111
#include "shared/source/command_container/command_encoder_xehp_and_later.inl"
1212
#include "shared/source/command_container/encode_compute_mode_tgllp_and_later.inl"
13-
#include "shared/source/command_container/implicit_scaling.h"
14-
#include "shared/source/command_container/implicit_scaling_xehp_and_later.inl"
1513
#include "shared/source/helpers/hw_helper.h"
1614
#include "shared/source/xe_hp_core/hw_cmds_base.h"
1715

@@ -72,6 +70,5 @@ template struct EncodeMiFlushDW<Family>;
7270
template struct EncodeMemoryPrefetch<Family>;
7371
template struct EncodeMiArbCheck<Family>;
7472
template struct EncodeWA<Family>;
75-
template struct ImplicitScalingDispatch<Family>;
7673
template struct EncodeEnableRayTracing<Family>;
7774
} // namespace NEO
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright (C) 2021 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "shared/source/command_container/implicit_scaling.h"
9+
#include "shared/source/command_container/implicit_scaling_xehp_and_later.inl"
10+
11+
namespace NEO {
12+
13+
using Family = XeHpFamily;
14+
15+
template struct ImplicitScalingDispatch<Family>;
16+
} // namespace NEO

shared/test/common/libult/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ macro(macro_for_each_gen)
3636
if(EXISTS ${SRC_FILE})
3737
list(APPEND neo_libult_common_SRCS_ENABLE_TESTED_HW ${SRC_FILE})
3838
endif()
39-
foreach(SRC_IT "enable_" "enable_family_full_core_")
39+
foreach(SRC_IT "enable_" "enable_family_full_core_" "implicit_scaling_")
4040
set(SRC_FILE ${NEO_SHARED_DIRECTORY}${BRANCH}${GEN_TYPE_LOWER}${BRANCH_DIR}${SRC_IT}${GEN_TYPE_LOWER}.cpp)
4141
if(EXISTS ${SRC_FILE})
4242
list(APPEND neo_libult_common_SRCS_ENABLE_TESTED_HW ${SRC_FILE})

0 commit comments

Comments
 (0)