Add debug key to override implicit scaling API support

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2021-11-25 10:02:36 +00:00
committed by Compute-Runtime-Automation
parent 6098290a0b
commit 1da896bee0
4 changed files with 20 additions and 1 deletions

View File

@ -343,4 +343,5 @@ OverridePreferredSlmAllocationSizePerDss = -1
ForceL3PrefetchForComputeWalker = -1
ForceZPassAsyncComputeThreadLimit = -1
ForcePixelAsyncComputeThreadLimit = -1
EnableImplicitScaling = -1
DecompressInL3ForImage2dFromBuffer = -1

View File

@ -14,9 +14,14 @@
namespace NEO {
bool ImplicitScalingHelper::isImplicitScalingEnabled(const DeviceBitfield &devices, bool preCondition) {
bool apiSupport = ImplicitScaling::apiSupport;
if (DebugManager.flags.EnableImplicitScaling.get() != -1) {
apiSupport = !!DebugManager.flags.EnableImplicitScaling.get();
}
bool partitionWalker = (devices.count() > 1u) &&
preCondition &&
ImplicitScaling::apiSupport;
apiSupport;
if (DebugManager.flags.EnableWalkerPartition.get() != -1) {
partitionWalker = !!DebugManager.flags.EnableWalkerPartition.get();

View File

@ -246,6 +246,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionControllerTimeout, -1, "Set dire
/* IMPLICIT SCALING */
DECLARE_DEBUG_VARIABLE(int32_t, EnableWalkerPartition, -1, "-1: default, 0: disable, 1: enable, Enables Walker Partitioning via WPARID.")
DECLARE_DEBUG_VARIABLE(int32_t, EnableImplicitScaling, -1, "-1: default for API, 0: disable implicit scaling support on a given API, 1: enable implicit scaling support on a given API.")
DECLARE_DEBUG_VARIABLE(int32_t, SynchronizeWalkerInWparidMode, -1, "-1: default, 0: do not synchronize 1: synchronize all tiles prior to doing work distrubution")
DECLARE_DEBUG_VARIABLE(int32_t, SynchronizeWithSemaphores, -1, "-1: default (disabled), 1: Emit Semaphores waiting after Walker completion in WPARID mode 0: do not emit semaphores after Walker")
DECLARE_DEBUG_VARIABLE(int32_t, UseCrossAtomicSynchronization, -1, "-1: default (enabled), 1: Cross Tile Atomic Synchronization present 0: Cross tile atomic synchronization disabled")

View File

@ -187,3 +187,15 @@ TEST_F(ImplicitScalingTests, givenForceEnableWhenCheckingCrossTileAtomicSyncThen
DebugManager.flags.UseCrossAtomicSynchronization.set(1);
EXPECT_TRUE(ImplicitScalingHelper::isCrossTileAtomicRequired(false));
}
TEST_F(ImplicitScalingTests, givenMultiTileAndApiSupportOffWhenForcedApiSupportOnThenFeatureEnabled) {
DebugManager.flags.EnableImplicitScaling.set(1);
ImplicitScaling::apiSupport = false;
EXPECT_TRUE(ImplicitScalingHelper::isImplicitScalingEnabled(twoTile, true));
}
TEST_F(ImplicitScalingTests, givenMultiTileAndApiSupportOnWhenForcedApiSupportOffThenFeatureDisabled) {
DebugManager.flags.EnableImplicitScaling.set(0);
ImplicitScaling::apiSupport = true;
EXPECT_FALSE(ImplicitScalingHelper::isImplicitScalingEnabled(twoTile, true));
}