Skip to content

Commit 7c5f179

Browse files
Thomasgfxbot
authored andcommitted
Add flag to allow thread combining for shader without barrier or SLM
Change-Id: Icd22324477ad59f9743865292e0d1c33a473b708
1 parent 35e643d commit 7c5f179

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

IGC/Compiler/ThreadCombining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ bool ThreadCombining::canDoOptimization(Function* m_kernel, llvm::Module& M)
355355
if (threadGroupSize_X == 1 ||
356356
threadGroupSize_Y == 1 ||
357357
threadGroupSize_Z != 1 ||
358-
!m_SLMUsed ||
358+
(!m_SLMUsed && IGC_IS_FLAG_DISABLED(EnableThreadCombiningWithNoSLM))||
359359
anyBarrierWithinControlFlow)
360360
{
361361
return false;

IGC/common/igc_flags.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ DECLARE_IGC_REGKEY(DWORD, OCLInlineThreshold, 512, "Setting OCL inli
248248
DECLARE_IGC_REGKEY(bool, EnableForceGroupSize, false, "Enable forcing thread Group Size ForceGroupSizeX and ForceGroupSizeY")
249249
DECLARE_IGC_REGKEY(DWORD, ForceGroupSizeX, 8, "force group size along X")
250250
DECLARE_IGC_REGKEY(DWORD, ForceGroupSizeY, 8, "force group size along Y")
251+
DECLARE_IGC_REGKEY(bool, EnableThreadCombiningWithNoSLM, false, "Enable thread combining opt for shader without SLM")
251252
DECLARE_IGC_REGKEY(DWORD, SubroutineThreshold, 110000, "Minimal kernel size to enable subroutines")
252253
DECLARE_IGC_REGKEY(DWORD, SubroutineInlinerThreshold, 3000, "Subroutine inliner threshold")
253254
DECLARE_IGC_REGKEY(bool, EnableConstantPromotion, true, "Enable global constant data to register promotion")

0 commit comments

Comments
 (0)