Skip to content

Commit e3d2a7d

Browse files
authored
[libc] Compile the GPU functions with '-fconvergent-functions' (#70229)
Summary: This patch simply adds the `-fconvergent-functions` flag to the GPU compilation. This is in relation to the behaviour of SIMT architectures under divergence. With the flag, we assume every function is convergent by default and rely on the compiler's divergence analysis to transform it if possible. Fixes: #63853
1 parent 0fc8f0b commit e3d2a7d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libc/cmake/modules/LLVMLibCObjectRules.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ function(_get_common_compile_options output_var flags)
6868
if (LIBC_TARGET_ARCHITECTURE_IS_GPU)
6969
list(APPEND compile_options "-nogpulib")
7070
list(APPEND compile_options "-fvisibility=hidden")
71+
list(APPEND compile_options "-fconvergent-functions")
7172

7273
# Manually disable all standard include paths and include the resource
7374
# directory to prevent system headers from being included.

0 commit comments

Comments
 (0)