refactor: rename global debug manager to debugManager

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-11-30 08:32:25 +00:00
committed by Compute-Runtime-Automation
parent f2ede40d2e
commit c9664e6bad
849 changed files with 6194 additions and 6194 deletions

View File

@@ -86,9 +86,9 @@ void EncodeDispatchKernel<Family>::appendAdditionalIDDFields(InterfaceDescriptor
} else {
pInterfaceDescriptor->setPreferredSlmAllocationSize(programmableIdPreferredSlmSize);
}
if (DebugManager.flags.OverridePreferredSlmAllocationSizePerDss.get() != -1) {
if (debugManager.flags.OverridePreferredSlmAllocationSizePerDss.get() != -1) {
auto toProgram =
static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(DebugManager.flags.OverridePreferredSlmAllocationSizePerDss.get());
static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(debugManager.flags.OverridePreferredSlmAllocationSizePerDss.get());
pInterfaceDescriptor->setPreferredSlmAllocationSize(toProgram);
}
}
@@ -105,9 +105,9 @@ void EncodeDispatchKernel<Family>::adjustInterfaceDescriptorData(InterfaceDescri
}
}
if (DebugManager.flags.ForceThreadGroupDispatchSize.get() != -1) {
if (debugManager.flags.ForceThreadGroupDispatchSize.get() != -1) {
interfaceDescriptor.setThreadGroupDispatchSize(
static_cast<INTERFACE_DESCRIPTOR_DATA::THREAD_GROUP_DISPATCH_SIZE>(DebugManager.flags.ForceThreadGroupDispatchSize.get()));
static_cast<INTERFACE_DESCRIPTOR_DATA::THREAD_GROUP_DISPATCH_SIZE>(debugManager.flags.ForceThreadGroupDispatchSize.get()));
}
}
@@ -126,7 +126,7 @@ template <typename WalkerType>
void EncodeDispatchKernel<Family>::encodeAdditionalWalkerFields(const RootDeviceEnvironment &rootDeviceEnvironment, WalkerType &walkerCmd, const EncodeWalkerArgs &walkerArgs) {
auto *releaseHelper = rootDeviceEnvironment.getReleaseHelper();
bool l3PrefetchDisable = releaseHelper->isPrefetchDisablingRequired();
int32_t overrideL3PrefetchDisable = DebugManager.flags.ForceL3PrefetchForComputeWalker.get();
int32_t overrideL3PrefetchDisable = debugManager.flags.ForceL3PrefetchForComputeWalker.get();
if (overrideL3PrefetchDisable != -1) {
l3PrefetchDisable = !overrideL3PrefetchDisable;
}
@@ -179,7 +179,7 @@ template <>
void EncodeSurfaceState<Family>::appendParamsForImageFromBuffer(R_SURFACE_STATE *surfaceState) {
const auto ccsMode = R_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_CCS_E;
if (ccsMode == surfaceState->getAuxiliarySurfaceMode() && R_SURFACE_STATE::SURFACE_TYPE::SURFACE_TYPE_SURFTYPE_2D == surfaceState->getSurfaceType()) {
if (DebugManager.flags.DecompressInL3ForImage2dFromBuffer.get() != 0) {
if (debugManager.flags.DecompressInL3ForImage2dFromBuffer.get() != 0) {
surfaceState->setAuxiliarySurfaceMode(AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE);
surfaceState->setDecompressInL3(R_SURFACE_STATE::DECOMPRESS_IN_L3_ENABLE);
surfaceState->setMemoryCompressionEnable(1);

View File

@@ -79,13 +79,13 @@ void BlitCommandsHelper<Family>::appendBlitCommandsBlockCopy(const BlitPropertie
appendClearColor(blitProperties, blitCmd);
uint32_t compressionFormat = rootDeviceEnvironment.getGmmClientContext()->getSurfaceStateCompressionFormat(GMM_RESOURCE_FORMAT::GMM_FORMAT_GENERIC_8BIT);
if (DebugManager.flags.ForceBufferCompressionFormat.get() != -1) {
compressionFormat = DebugManager.flags.ForceBufferCompressionFormat.get();
if (debugManager.flags.ForceBufferCompressionFormat.get() != -1) {
compressionFormat = debugManager.flags.ForceBufferCompressionFormat.get();
}
auto compressionEnabledField = XY_BLOCK_COPY_BLT::COMPRESSION_ENABLE::COMPRESSION_ENABLE_COMPRESSION_ENABLE;
if (DebugManager.flags.ForceCompressionDisabledForCompressedBlitCopies.get() != -1) {
compressionEnabledField = static_cast<typename XY_BLOCK_COPY_BLT::COMPRESSION_ENABLE>(DebugManager.flags.ForceCompressionDisabledForCompressedBlitCopies.get());
if (debugManager.flags.ForceCompressionDisabledForCompressedBlitCopies.get() != -1) {
compressionEnabledField = static_cast<typename XY_BLOCK_COPY_BLT::COMPRESSION_ENABLE>(debugManager.flags.ForceCompressionDisabledForCompressedBlitCopies.get());
}
if (blitProperties.dstAllocation->isCompressionEnabled()) {
@@ -130,18 +130,18 @@ void BlitCommandsHelper<Family>::appendBlitCommandsBlockCopy(const BlitPropertie
auto mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED);
if (DebugManager.flags.OverrideBlitterMocs.get() == 1) {
if (debugManager.flags.OverrideBlitterMocs.get() == 1) {
mocs = rootDeviceEnvironment.getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER);
}
blitCmd.setDestinationMOCS(mocs);
blitCmd.setSourceMOCS(mocs);
if (DebugManager.flags.OverrideBlitterTargetMemory.get() != -1) {
if (DebugManager.flags.OverrideBlitterTargetMemory.get() == 0u) {
if (debugManager.flags.OverrideBlitterTargetMemory.get() != -1) {
if (debugManager.flags.OverrideBlitterTargetMemory.get() == 0u) {
blitCmd.setDestinationTargetMemory(XY_BLOCK_COPY_BLT::TARGET_MEMORY::TARGET_MEMORY_SYSTEM_MEM);
blitCmd.setSourceTargetMemory(XY_BLOCK_COPY_BLT::TARGET_MEMORY::TARGET_MEMORY_SYSTEM_MEM);
} else if (DebugManager.flags.OverrideBlitterTargetMemory.get() == 1u) {
} else if (debugManager.flags.OverrideBlitterTargetMemory.get() == 1u) {
blitCmd.setDestinationTargetMemory(XY_BLOCK_COPY_BLT::TARGET_MEMORY::TARGET_MEMORY_LOCAL_MEM);
blitCmd.setSourceTargetMemory(XY_BLOCK_COPY_BLT::TARGET_MEMORY::TARGET_MEMORY_LOCAL_MEM);
}

View File

@@ -16,7 +16,7 @@ template <>
void ProductHelperHw<gfxProduct>::adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) const {
using SAMPLER_STATE = typename XeHpgCoreFamily::SAMPLER_STATE;
auto samplerState = reinterpret_cast<SAMPLER_STATE *>(sampler);
if (DebugManager.flags.ForceSamplerLowFilteringPrecision.get()) {
if (debugManager.flags.ForceSamplerLowFilteringPrecision.get()) {
samplerState->setLowQualityFilter(SAMPLER_STATE::LOW_QUALITY_FILTER_ENABLE);
}
@@ -138,8 +138,8 @@ std::pair<bool, bool> ProductHelperHw<gfxProduct>::isPipeControlPriorToNonPipeli
auto isBasicWARequired = isAcm;
auto isExtendedWARequired = isAcm && hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1 && !isRcs;
if (DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get() != -1) {
isExtendedWARequired = DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get();
if (debugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get() != -1) {
isExtendedWARequired = debugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get();
}
return {isBasicWARequired, isExtendedWARequired};
@@ -202,8 +202,8 @@ bool ProductHelperHw<gfxProduct>::isStorageInfoAdjustmentRequired() const {
template <>
bool ProductHelperHw<gfxProduct>::isResolveDependenciesByPipeControlsSupported(const HardwareInfo &hwInfo, bool isOOQ, TaskCountType queueTaskCount, const CommandStreamReceiver &queueCsr) const {
const bool enabled = !isOOQ && queueTaskCount == queueCsr.peekTaskCount();
if (DebugManager.flags.ResolveDependenciesViaPipeControls.get() != -1) {
return DebugManager.flags.ResolveDependenciesViaPipeControls.get() == 1;
if (debugManager.flags.ResolveDependenciesViaPipeControls.get() != -1) {
return debugManager.flags.ResolveDependenciesViaPipeControls.get() == 1;
}
return enabled;
}

View File

@@ -35,8 +35,8 @@ inline bool GfxCoreHelperHw<Family>::isFusedEuDispatchEnabled(const HardwareInfo
if (disableEUFusionForKernel)
fusedEuDispatchEnabled = false;
if (DebugManager.flags.CFEFusedEUDispatch.get() != -1) {
fusedEuDispatchEnabled = (DebugManager.flags.CFEFusedEUDispatch.get() == 0);
if (debugManager.flags.CFEFusedEUDispatch.get() != -1) {
fusedEuDispatchEnabled = (debugManager.flags.CFEFusedEUDispatch.get() == 0);
}
return fusedEuDispatchEnabled;
}
@@ -65,8 +65,8 @@ template <>
void GfxCoreHelperHw<Family>::setL1CachePolicy(bool useL1Cache, typename Family::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) const {
if (useL1Cache) {
surfaceState->setL1CachePolicyL1CacheControl(Family::RENDER_SURFACE_STATE::L1_CACHE_POLICY_WB);
if (DebugManager.flags.OverrideL1CacheControlInSurfaceStateForScratchSpace.get() != -1) {
surfaceState->setL1CachePolicyL1CacheControl(static_cast<typename Family::RENDER_SURFACE_STATE::L1_CACHE_POLICY>(DebugManager.flags.OverrideL1CacheControlInSurfaceStateForScratchSpace.get()));
if (debugManager.flags.OverrideL1CacheControlInSurfaceStateForScratchSpace.get() != -1) {
surfaceState->setL1CachePolicyL1CacheControl(static_cast<typename Family::RENDER_SURFACE_STATE::L1_CACHE_POLICY>(debugManager.flags.OverrideL1CacheControlInSurfaceStateForScratchSpace.get()));
}
}
}
@@ -76,8 +76,8 @@ bool GfxCoreHelperHw<Family>::isBankOverrideRequired(const HardwareInfo &hwInfo,
bool forceOverrideMemoryBankIndex = false;
if (DebugManager.flags.ForceMemoryBankIndexOverride.get() != -1) {
forceOverrideMemoryBankIndex = static_cast<bool>(DebugManager.flags.ForceMemoryBankIndexOverride.get());
if (debugManager.flags.ForceMemoryBankIndexOverride.get() != -1) {
forceOverrideMemoryBankIndex = static_cast<bool>(debugManager.flags.ForceMemoryBankIndexOverride.get());
}
return forceOverrideMemoryBankIndex;
}
@@ -96,8 +96,8 @@ void MemorySynchronizationCommands<Family>::addAdditionalSynchronizationForDirec
template <>
bool GfxCoreHelperHw<Family>::isBufferSizeSuitableForCompression(const size_t size) const {
if (DebugManager.flags.OverrideBufferSuitableForRenderCompression.get() != -1) {
return !!DebugManager.flags.OverrideBufferSuitableForRenderCompression.get();
if (debugManager.flags.OverrideBufferSuitableForRenderCompression.get() != -1) {
return !!debugManager.flags.OverrideBufferSuitableForRenderCompression.get();
}
if (CompressionSelector::allowStatelessCompression()) {
@@ -122,8 +122,8 @@ uint32_t GfxCoreHelperHw<Family>::computeSlmValues(const HardwareInfo &hwInfo, u
template <>
bool GfxCoreHelperHw<Family>::copyThroughLockedPtrEnabled(const HardwareInfo &hwInfo, const ProductHelper &productHelper) const {
if (DebugManager.flags.ExperimentalCopyThroughLock.get() != -1) {
return DebugManager.flags.ExperimentalCopyThroughLock.get() == 1;
if (debugManager.flags.ExperimentalCopyThroughLock.get() != -1) {
return debugManager.flags.ExperimentalCopyThroughLock.get() == 1;
}
return this->isLocalMemoryEnabled(hwInfo) && !productHelper.isUnlockingLockedPtrNecessary(hwInfo);

View File

@@ -25,11 +25,11 @@ void PreambleHelper<Family>::appendProgramVFEState(const RootDeviceEnvironment &
command->setComputeOverdispatchDisable(streamProperties.frontEndState.disableOverdispatch.value == 1);
command->setSingleSliceDispatchCcsMode(streamProperties.frontEndState.singleSliceDispatchCcsMode.value == 1);
if (DebugManager.flags.CFEComputeOverdispatchDisable.get() != -1) {
command->setComputeOverdispatchDisable(DebugManager.flags.CFEComputeOverdispatchDisable.get());
if (debugManager.flags.CFEComputeOverdispatchDisable.get() != -1) {
command->setComputeOverdispatchDisable(debugManager.flags.CFEComputeOverdispatchDisable.get());
}
if (DebugManager.flags.CFESingleSliceDispatchCCSMode.get() != -1) {
command->setSingleSliceDispatchCcsMode(DebugManager.flags.CFESingleSliceDispatchCCSMode.get());
if (debugManager.flags.CFESingleSliceDispatchCCSMode.get() != -1) {
command->setSingleSliceDispatchCcsMode(debugManager.flags.CFESingleSliceDispatchCCSMode.get());
}
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
@@ -39,8 +39,8 @@ void PreambleHelper<Family>::appendProgramVFEState(const RootDeviceEnvironment &
}
command->setNumberOfWalkers(1);
if (DebugManager.flags.CFENumberOfWalkers.get() != -1) {
command->setNumberOfWalkers(DebugManager.flags.CFENumberOfWalkers.get());
if (debugManager.flags.CFENumberOfWalkers.get() != -1) {
command->setNumberOfWalkers(debugManager.flags.CFENumberOfWalkers.get());
}
}

View File

@@ -62,8 +62,8 @@ bool ProductHelperHw<gfxProduct>::isDummyBlitWaRequired() const {
template <>
bool ProductHelperHw<gfxProduct>::isResolveDependenciesByPipeControlsSupported(const HardwareInfo &hwInfo, bool isOOQ, TaskCountType queueTaskCount, const CommandStreamReceiver &queueCsr) const {
const bool enabled = !isOOQ && queueTaskCount == queueCsr.peekTaskCount();
if (DebugManager.flags.ResolveDependenciesViaPipeControls.get() != -1) {
return DebugManager.flags.ResolveDependenciesViaPipeControls.get() == 1;
if (debugManager.flags.ResolveDependenciesViaPipeControls.get() != -1) {
return debugManager.flags.ResolveDependenciesViaPipeControls.get() == 1;
}
return enabled;
}
@@ -104,8 +104,8 @@ uint32_t ProductHelperHw<gfxProduct>::getCommandBuffersPreallocatedPerCommandQue
template <>
uint32_t ProductHelperHw<gfxProduct>::getInternalHeapsPreallocated() const {
if (DebugManager.flags.SetAmountOfInternalHeapsToPreallocate.get() != -1) {
return DebugManager.flags.SetAmountOfInternalHeapsToPreallocate.get();
if (debugManager.flags.SetAmountOfInternalHeapsToPreallocate.get() != -1) {
return debugManager.flags.SetAmountOfInternalHeapsToPreallocate.get();
}
return 1u;
}