Skip to content

Commit

Permalink
Add new metadata knob for SynchronizationObjectCoalescing
Browse files Browse the repository at this point in the history
Adds a new metadata field that disables memory fence optimization
that treats UGM fences as also synchronizing SLM.
  • Loading branch information
mmerecki authored and igcbot committed Dec 4, 2024
1 parent 3baaf42 commit 6ed06e2
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions IGC/Compiler/Optimizer/SynchronizationObjectCoalescing.cpp
Original file line number Diff line number Diff line change
@@ -563,8 +563,10 @@ bool SynchronizationObjectCoalescing::runOnFunction(llvm::Function& F)
{
m_CurrentFunction = &F;
const CodeGenContext* const ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
const ModuleMetaData* const md = ctx->getModuleMetaData();
m_HasIndependentSharedMemoryFenceFunctionality = !ctx->platform.hasSLMFence() ||
(ctx->platform.hasSLMFence() && ctx->platform.hasIndependentSharedMemoryFenceFunctionality()) ||
md->compOpt.EnableIndependentSharedMemoryFenceFunctionality ||
IGC_IS_FLAG_ENABLED(EnableIndependentSharedMemoryFenceFunctionality);
m_ShaderType = ctx->type;
m_HasTypedMemoryFenceFunctionality = ctx->platform.hasLSC() && ctx->platform.LSCEnabled();
1 change: 1 addition & 0 deletions IGC/common/MDFrameWork.h
Original file line number Diff line number Diff line change
@@ -450,6 +450,7 @@ enum class ShaderTypeMD
bool WaEnableALTModeVisaWA = false;
bool EnableLdStCombineforLoad = false;
bool EnableLdStCombinewithDummyLoad = false;
bool EnableIndependentSharedMemoryFenceFunctionality = false;
bool NewSpillCostFunction = false;
bool ForceLargeGRFNum4RQ = false;
bool DisableEUFusion = false;

0 comments on commit 6ed06e2

Please sign in to comment.