Skip to content

Commit 55c24ed

Browse files
Gang Y Chenigcbot
Gang Y Chen
authored andcommitted
Add an option to disable scalarizer in GPGPU path
1 parent b0be583 commit 55c24ed

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

IGC/AdaptorOCL/UnifyIROCL.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,10 @@ static void CommonOCLBasedPasses(
511511
mpm.add(createIGCInstructionCombiningPass());
512512

513513
// "false" to createScalarizerPass() means that vector load/stores are NOT scalarized
514-
mpm.add(createScalarizerPass(false));
514+
if (IGC_IS_FLAG_ENABLED(DisableScalarizerGPGPU) == false)
515+
{
516+
mpm.add(createScalarizerPass(false));
517+
}
515518

516519
// Create a dummy kernel to attach the symbol table if necessary
517520
// Only needed if function pointers, externally linked functions, or relocatable global variables are present

IGC/common/igc_flags.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ DECLARE_IGC_REGKEY(bool, DisableMemOpt2, false, "Disable MemOpt2"
288288
DECLARE_IGC_REGKEY(bool, DisablePreRAScheduler, false, "Disable Pre RA Scheduling", false)
289289
DECLARE_IGC_REGKEY(DWORD,MaxLiveOutThreshold, 0, "Max LiveOut Threshold in MemOpt2", false)
290290
DECLARE_IGC_REGKEY(bool, DisableScalarAtomics, false, "Disable the Scalar Atomics optimization", false)
291+
DECLARE_IGC_REGKEY(bool, DisableScalarizerGPGPU, false, "disable scalarizer on GPGPU path", true)
291292
DECLARE_IGC_REGKEY(bool, HoistPSConstBufferValues, true, "Hoists up down converts for contant buffer accesses, so they an be vectorized more easily.", false)
292293
DECLARE_IGC_REGKEY(bool, EnableSingleVertexDispatch, false, "Vertex Shader Single Patch Dispatch Regkey", false)
293294
DECLARE_IGC_REGKEY(bool, allowLICM, true, "Enable LICM in IGC.", false)

0 commit comments

Comments
 (0)