Skip to content

Commit 80d7ca2

Browse files
ustachowigcbot
authored andcommitted
Add ActiveThreadsOnlyBarrier option for OpenCL shaders
Added a condition to set the vISA_ActiveThreadsOnlyBarrier option for SYCL/OpenCL shaders. This ensures that the ActiveThreadsOnlyBarrier option is enabled for both COMPUTE_SHADER and OPENCL_SHADER types. ATOB can be enabled when we don't use GenISA_threadgroupbarrier and GenISA_threadgroupbarrier_signal in llvm-IR at the same time.
1 parent e653864 commit 80d7ca2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4547,7 +4547,7 @@ namespace IGC
45474547

45484548
SetAbortOnSpillThreshold(canAbortOnSpill, AllowSpill);
45494549

4550-
if (context->type == ShaderType::COMPUTE_SHADER)
4550+
if (context->type == ShaderType::COMPUTE_SHADER || (context->type == ShaderType::OPENCL_SHADER && !(context->getModuleMetaData()->NBarrierCnt > 0)))
45514551
{
45524552
SaveOption(vISA_ActiveThreadsOnlyBarrier, true);
45534553
}

0 commit comments

Comments
 (0)