Skip to content

Commit eda3531

Browse files
Rename functions and variables in Implicit Scaling
Related-To: NEO-6244 Signed-off-by: Zbigniew Zdanowicz <[email protected]>
1 parent eace896 commit eda3531

12 files changed

+160
-157
lines changed

opencl/test/unit_test/command_queue/dispatch_walker_tests_xehp_and_later.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenWalkerPart
10881088
WalkerPartition::WalkerPartitionArgs testArgs = {};
10891089
testArgs.initializeWparidRegister = true;
10901090
testArgs.crossTileAtomicSynchronization = true;
1091-
testArgs.usePipeControlStall = true;
1091+
testArgs.emitPipeControlStall = true;
10921092
testArgs.partitionCount = 2u;
10931093
testArgs.tileCount = static_cast<uint32_t>(device->getDeviceBitfield().count());
10941094

@@ -1171,7 +1171,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenQueueIsMul
11711171

11721172
WalkerPartition::WalkerPartitionArgs testArgs = {};
11731173
testArgs.initializeWparidRegister = true;
1174-
testArgs.usePipeControlStall = true;
1174+
testArgs.emitPipeControlStall = true;
11751175
testArgs.crossTileAtomicSynchronization = true;
11761176
testArgs.partitionCount = 16u;
11771177
testArgs.tileCount = static_cast<uint32_t>(device->getDeviceBitfield().count());
@@ -1386,7 +1386,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenDispatchPr
13861386
EXPECT_EQ(0u, cmdStream.getUsed());
13871387
}
13881388

1389-
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenOpenClWhenEnqueuePartitionWalkerThenExpectNoNativeCrossTileSyncCleanup) {
1389+
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenOpenClWhenEnqueuePartitionWalkerThenExpectNoSelfCleanupSection) {
13901390
using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM;
13911391

13921392
if (!OSInterface::osEnableLocalMemory) {

opencl/test/unit_test/command_queue/walker_partition_fixture_xehp_and_later.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ void WalkerPartitionTests::SetUp() {
1111
cmdBufferAddress = cmdBuffer;
1212

1313
testArgs.synchronizeBeforeExecution = false;
14-
testArgs.nativeCrossTileAtomicSync = false;
14+
testArgs.emitSelfCleanup = false;
1515
testArgs.initializeWparidRegister = true;
16-
testArgs.usePipeControlStall = true;
16+
testArgs.emitPipeControlStall = true;
1717
testArgs.crossTileAtomicSynchronization = true;
1818
}
1919

opencl/test/unit_test/command_queue/walker_partition_tests_xehp_and_later_1.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,10 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionAnd
416416
EXPECT_EQ(parsedOffset, totalBytesProgrammed);
417417
}
418418

419-
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWithNativeCrossTileSyncWhenConstructCommandBufferIsCalledThenBatchBufferIsBeingProgrammed) {
419+
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWithSelfCleanupWhenConstructCommandBufferIsCalledThenBatchBufferIsBeingProgrammed) {
420420
testArgs.tileCount = 4u;
421421
testArgs.partitionCount = testArgs.tileCount;
422-
testArgs.nativeCrossTileAtomicSync = true;
422+
testArgs.emitSelfCleanup = true;
423423
testArgs.staticPartitioning = true;
424424

425425
checkForProperCmdBufferAddressOffset = false;
@@ -564,11 +564,11 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWit
564564
EXPECT_EQ(parsedOffset, totalBytesProgrammed);
565565
}
566566

567-
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWithNativeCrossTileSyncAndSyncDisabledWithFlagWhenConstructCommandBufferIsCalledThenStillProgramTheSync) {
567+
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWithSelfCleanupAndCrossTileSyncDisabledWithFlagWhenConstructCommandBufferIsCalledThenStillProgramTheSync) {
568568
testArgs.crossTileAtomicSynchronization = false;
569569
testArgs.tileCount = 4u;
570570
testArgs.partitionCount = testArgs.tileCount;
571-
testArgs.nativeCrossTileAtomicSync = true;
571+
testArgs.emitSelfCleanup = true;
572572
testArgs.staticPartitioning = true;
573573
checkForProperCmdBufferAddressOffset = false;
574574
uint64_t cmdBufferGpuAddress = 0x8000123000;
@@ -712,11 +712,11 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWit
712712
EXPECT_EQ(parsedOffset, totalBytesProgrammed);
713713
}
714714

715-
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWithNativeCrossTileSyncAndAtomicsForNativeWhenConstructCommandBufferIsCalledThenBatchBufferIsBeingProgrammed) {
715+
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWithSelfCleanupAndAtomicsForSelfCleanupWhenConstructCommandBufferIsCalledThenBatchBufferIsBeingProgrammed) {
716716
testArgs.tileCount = 4u;
717717
testArgs.partitionCount = testArgs.tileCount;
718-
testArgs.useAtomicsForNativeCleanup = true;
719-
testArgs.nativeCrossTileAtomicSync = true;
718+
testArgs.useAtomicsForSelfCleanup = true;
719+
testArgs.emitSelfCleanup = true;
720720
testArgs.staticPartitioning = true;
721721
checkForProperCmdBufferAddressOffset = false;
722722
uint64_t cmdBufferGpuAddress = 0x8000123000;
@@ -866,12 +866,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWit
866866
EXPECT_EQ(parsedOffset, totalBytesProgrammed);
867867
}
868868

869-
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWithNativeCrossTileSyncAndSyncDisabledWithFlagWhenUsingAtomicForNativeAndConstructCommandBufferIsCalledThenStillProgramTheSync) {
869+
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWithSlefCleanupAndCrossTileSyncDisabledWithFlagWhenUsingAtomicForSelfCleanupAndConstructCommandBufferIsCalledThenStillProgramTheSync) {
870870
testArgs.crossTileAtomicSynchronization = false;
871871
testArgs.tileCount = 4u;
872872
testArgs.partitionCount = testArgs.tileCount;
873-
testArgs.nativeCrossTileAtomicSync = true;
874-
testArgs.useAtomicsForNativeCleanup = true;
873+
testArgs.emitSelfCleanup = true;
874+
testArgs.useAtomicsForSelfCleanup = true;
875875
testArgs.staticPartitioning = true;
876876
checkForProperCmdBufferAddressOffset = false;
877877
uint64_t cmdBufferGpuAddress = 0x8000123000;
@@ -1159,9 +1159,9 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWhe
11591159
testArgs.tileCount = 4u;
11601160
testArgs.partitionCount = testArgs.tileCount;
11611161
testArgs.initializeWparidRegister = false;
1162-
testArgs.nativeCrossTileAtomicSync = false;
1162+
testArgs.emitSelfCleanup = false;
11631163
testArgs.crossTileAtomicSynchronization = false;
1164-
testArgs.useAtomicsForNativeCleanup = false;
1164+
testArgs.useAtomicsForSelfCleanup = false;
11651165
testArgs.staticPartitioning = true;
11661166

11671167
checkForProperCmdBufferAddressOffset = false;
@@ -1218,10 +1218,10 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWhe
12181218
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticWalkerPartitionWhenPipeControlProgrammingDisabledThenExpectNoPipeControlCommand) {
12191219
testArgs.tileCount = 4u;
12201220
testArgs.partitionCount = testArgs.tileCount;
1221-
testArgs.nativeCrossTileAtomicSync = false;
1222-
testArgs.usePipeControlStall = false;
1221+
testArgs.emitSelfCleanup = false;
1222+
testArgs.emitPipeControlStall = false;
12231223
testArgs.crossTileAtomicSynchronization = false;
1224-
testArgs.useAtomicsForNativeCleanup = false;
1224+
testArgs.useAtomicsForSelfCleanup = false;
12251225
testArgs.staticPartitioning = true;
12261226

12271227
checkForProperCmdBufferAddressOffset = false;

opencl/test/unit_test/command_queue/walker_partition_tests_xehp_and_later_2.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticPartitioningEstima
148148
estimateSpaceRequiredInCommandBuffer<FamilyType>(testArgs));
149149
}
150150

151-
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenEstimationNativeSectionsWhenItIsCalledThenProperSizeIsReturned) {
151+
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenEstimationSelfCleanupSectionsWhenItIsCalledThenProperSizeIsReturned) {
152152
testArgs.partitionCount = 16u;
153153
testArgs.emitBatchBufferEnd = false;
154154
testArgs.synchronizeBeforeExecution = false;
155-
testArgs.nativeCrossTileAtomicSync = true;
155+
testArgs.emitSelfCleanup = true;
156156

157157
auto expectedUsedSize = sizeof(WalkerPartition::LOAD_REGISTER_IMM<FamilyType>) +
158158
sizeof(WalkerPartition::MI_ATOMIC<FamilyType>) * 2 +
@@ -172,12 +172,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenEstimationNativeSections
172172
estimateSpaceRequiredInCommandBuffer<FamilyType>(testArgs));
173173
}
174174

175-
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenEstimationNativeSectionsWhenAtomicsUsedForNativeThenProperSizeIsReturned) {
175+
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenEstimationSelfCleanupSectionsWhenAtomicsUsedForSelfCleanupThenProperSizeIsReturned) {
176176
testArgs.partitionCount = 16u;
177177
testArgs.emitBatchBufferEnd = false;
178178
testArgs.synchronizeBeforeExecution = false;
179-
testArgs.nativeCrossTileAtomicSync = true;
180-
testArgs.useAtomicsForNativeCleanup = true;
179+
testArgs.emitSelfCleanup = true;
180+
testArgs.useAtomicsForSelfCleanup = true;
181181

182182
auto expectedUsedSize = sizeof(WalkerPartition::LOAD_REGISTER_IMM<FamilyType>) +
183183
sizeof(WalkerPartition::MI_ATOMIC<FamilyType>) * 2 +
@@ -828,11 +828,11 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenStaticPartitioningWhenZD
828828
EXPECT_EQ(FamilyType::COMPUTE_WALKER::PARTITION_TYPE::PARTITION_TYPE_Z, walker.getPartitionType());
829829
}
830830

831-
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenNativeCrossTileSyncWhenDebugForceDisableCrossTileSyncThenNativeOverridesDebugAndAddsOwnCleanupSection) {
831+
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenSelfCleanupSectionWhenDebugForceDisableCrossTileSyncThenSelfCleanupOverridesDebugAndAddsOwnCleanupSection) {
832832
testArgs.crossTileAtomicSynchronization = false;
833833
testArgs.partitionCount = 16u;
834834
checkForProperCmdBufferAddressOffset = false;
835-
testArgs.nativeCrossTileAtomicSync = true;
835+
testArgs.emitSelfCleanup = true;
836836
uint64_t gpuVirtualAddress = 0x8000123000;
837837
uint64_t postSyncAddress = 0x8000456000;
838838
WalkerPartition::COMPUTE_WALKER<FamilyType> walker;
@@ -1028,12 +1028,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenNativeCrossTileSyncWhenD
10281028
EXPECT_EQ(miSemaphoreWait->getSemaphoreDataDword(), 2 * testArgs.tileCount);
10291029
}
10301030

1031-
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenNativeCrossTileSyncAndAtomicsUsedForNativeWhenDebugForceDisableCrossTileSyncThenNativeOverridesDebugAndAddsOwnCleanupSection) {
1031+
HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenSelfCleanupAndAtomicsUsedForCleanupWhenDebugForceDisableCrossTileSyncThenSelfCleanupOverridesDebugAndAddsOwnCleanupSection) {
10321032
testArgs.crossTileAtomicSynchronization = false;
10331033
testArgs.partitionCount = 16u;
10341034
checkForProperCmdBufferAddressOffset = false;
1035-
testArgs.nativeCrossTileAtomicSync = true;
1036-
testArgs.useAtomicsForNativeCleanup = true;
1035+
testArgs.emitSelfCleanup = true;
1036+
testArgs.useAtomicsForSelfCleanup = true;
10371037
uint64_t gpuVirtualAddress = 0x8000123000;
10381038
uint64_t postSyncAddress = 0x8000456000;
10391039
WalkerPartition::COMPUTE_WALKER<FamilyType> walker;
@@ -1240,9 +1240,9 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, WalkerPartitionTests, givenDynamicPartitioningWhenP
12401240
testArgs.crossTileAtomicSynchronization = false;
12411241
testArgs.partitionCount = 16u;
12421242
testArgs.tileCount = 4u;
1243-
testArgs.nativeCrossTileAtomicSync = false;
1244-
testArgs.useAtomicsForNativeCleanup = false;
1245-
testArgs.usePipeControlStall = false;
1243+
testArgs.emitSelfCleanup = false;
1244+
testArgs.useAtomicsForSelfCleanup = false;
1245+
testArgs.emitPipeControlStall = false;
12461246

12471247
checkForProperCmdBufferAddressOffset = false;
12481248
uint64_t gpuVirtualAddress = 0x8000123000;

opencl/test/unit_test/test_files/igdrcl.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ OverrideUseKmdWaitFunction = -1
313313
EnableCacheFlushAfterWalkerForAllQueues = -1
314314
Force32BitDriverSupport = -1
315315
OverrideCmdQueueSynchronousMode = -1
316-
UseAtomicsForNativeSectionCleanup = -1
316+
UseAtomicsForSelfCleanupSection = -1
317317
HBMSizePerTileInGigabytes = 0
318318
OverrideSystolicPipelineSelect = -1
319319
OverrideSystolicInComputeWalker = -1
@@ -324,7 +324,7 @@ DoNotFreeResources = 0
324324
OverrideGmmResourceUsageField = -1
325325
LogAllocationType = 0
326326
ProgramAdditionalPipeControlBeforeStateComputeModeCommand = 0
327-
ProgramNativeCleanup = -1
327+
ProgramWalkerPartitionSelfCleanup = -1
328328
WparidRegisterProgramming = -1
329329
UsePipeControlAfterPartitionedWalker = -1
330330
OverrideBufferSuitableForRenderCompression = -1

shared/source/command_container/implicit_scaling.cpp

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,46 +28,49 @@ bool ImplicitScalingHelper::isImplicitScalingEnabled(const DeviceBitfield &devic
2828

2929
bool ImplicitScalingHelper::isSynchronizeBeforeExecutionRequired() {
3030
auto synchronizeBeforeExecution = false;
31-
if (DebugManager.flags.SynchronizeWalkerInWparidMode.get() != -1) {
32-
synchronizeBeforeExecution = static_cast<bool>(DebugManager.flags.SynchronizeWalkerInWparidMode.get());
31+
int overrideSynchronizeBeforeExecution = DebugManager.flags.SynchronizeWalkerInWparidMode.get();
32+
if (overrideSynchronizeBeforeExecution != -1) {
33+
synchronizeBeforeExecution = !!overrideSynchronizeBeforeExecution;
3334
}
3435
return synchronizeBeforeExecution;
3536
}
3637

3738
bool ImplicitScalingHelper::isSemaphoreProgrammingRequired() {
3839
auto semaphoreProgrammingRequired = ImplicitScaling::semaphoreProgrammingRequired;
39-
if (NEO::DebugManager.flags.SynchronizeWithSemaphores.get() == 1) {
40-
semaphoreProgrammingRequired = true;
40+
int overrideSemaphoreProgrammingRequired = NEO::DebugManager.flags.SynchronizeWithSemaphores.get();
41+
if (overrideSemaphoreProgrammingRequired != -1) {
42+
semaphoreProgrammingRequired = !!overrideSemaphoreProgrammingRequired;
4143
}
4244
return semaphoreProgrammingRequired;
4345
}
4446

4547
bool ImplicitScalingHelper::isCrossTileAtomicRequired() {
4648
auto crossTileAtomicSynchronization = ImplicitScaling::crossTileAtomicSynchronization;
47-
if (NEO::DebugManager.flags.UseCrossAtomicSynchronization.get() == 0) {
48-
crossTileAtomicSynchronization = false;
49+
int overrideCrossTileAtomicSynchronization = NEO::DebugManager.flags.UseCrossAtomicSynchronization.get();
50+
if (overrideCrossTileAtomicSynchronization != -1) {
51+
crossTileAtomicSynchronization = !!overrideCrossTileAtomicSynchronization;
4952
}
5053
return crossTileAtomicSynchronization;
5154
}
5255

53-
bool ImplicitScalingHelper::useAtomicsForNativeCleanup() {
56+
bool ImplicitScalingHelper::isAtomicsUsedForSelfCleanup() {
5457
bool useAtomics = false;
55-
int overrideUseAtomics = DebugManager.flags.UseAtomicsForNativeSectionCleanup.get();
58+
int overrideUseAtomics = DebugManager.flags.UseAtomicsForSelfCleanupSection.get();
5659
if (overrideUseAtomics != -1) {
5760
useAtomics = !!(overrideUseAtomics);
5861
}
5962
return useAtomics;
6063
}
6164

62-
bool ImplicitScalingHelper::programNativeCleanup(bool defaultNativeCleanup) {
63-
int overrideProgramNativeCleanup = DebugManager.flags.ProgramNativeCleanup.get();
64-
if (overrideProgramNativeCleanup != -1) {
65-
defaultNativeCleanup = !!(overrideProgramNativeCleanup);
65+
bool ImplicitScalingHelper::isSelfCleanupRequired(bool defaultSelfCleanup) {
66+
int overrideProgramSelfCleanup = DebugManager.flags.ProgramWalkerPartitionSelfCleanup.get();
67+
if (overrideProgramSelfCleanup != -1) {
68+
defaultSelfCleanup = !!(overrideProgramSelfCleanup);
6669
}
67-
return defaultNativeCleanup;
70+
return defaultSelfCleanup;
6871
}
6972

70-
bool ImplicitScalingHelper::initWparidRegister() {
73+
bool ImplicitScalingHelper::isWparidRegisterInitializationRequired() {
7174
bool initWparidRegister = true;
7275
int overrideInitWparidRegister = DebugManager.flags.WparidRegisterProgramming.get();
7376
if (overrideInitWparidRegister != -1) {
@@ -76,13 +79,13 @@ bool ImplicitScalingHelper::initWparidRegister() {
7679
return initWparidRegister;
7780
}
7881

79-
bool ImplicitScalingHelper::usePipeControl() {
80-
bool usePipeControl = true;
82+
bool ImplicitScalingHelper::isPipeControlStallRequired() {
83+
bool emitPipeControl = true;
8184
int overrideUsePipeControl = DebugManager.flags.UsePipeControlAfterPartitionedWalker.get();
8285
if (overrideUsePipeControl != -1) {
83-
usePipeControl = !!(overrideUsePipeControl);
86+
emitPipeControl = !!(overrideUsePipeControl);
8487
}
85-
return usePipeControl;
88+
return emitPipeControl;
8689
}
8790

8891
} // namespace NEO

shared/source/command_container/implicit_scaling.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ struct ImplicitScalingHelper {
2727
static bool isSemaphoreProgrammingRequired();
2828
static bool isCrossTileAtomicRequired();
2929
static bool isSynchronizeBeforeExecutionRequired();
30-
static bool useAtomicsForNativeCleanup();
31-
static bool programNativeCleanup(bool defaultNativeCleanup);
32-
static bool initWparidRegister();
33-
static bool usePipeControl();
30+
static bool isAtomicsUsedForSelfCleanup();
31+
static bool isSelfCleanupRequired(bool defaultSelfCleanup);
32+
static bool isWparidRegisterInitializationRequired();
33+
static bool isPipeControlStallRequired();
3434
};
3535

3636
template <typename GfxFamily>
3737
struct ImplicitScalingDispatch {
3838
using WALKER_TYPE = typename GfxFamily::WALKER_TYPE;
3939

40-
static size_t getSize(bool nativeCrossTileAtomicSync,
40+
static size_t getSize(bool emitSelfCleanup,
4141
bool preferStaticPartitioning,
4242
const DeviceBitfield &devices,
4343
const Vec3<size_t> &groupStart,
@@ -47,7 +47,7 @@ struct ImplicitScalingDispatch {
4747
const DeviceBitfield &devices,
4848
uint32_t &partitionCount,
4949
bool useSecondaryBatchBuffer,
50-
bool nativeCrossTileAtomicSync,
50+
bool emitSelfCleanup,
5151
bool usesImages,
5252
uint64_t workPartitionAllocationGpuVa);
5353
};

0 commit comments

Comments
 (0)