[libc-commits] [libc] 9a6517e - [libc][NFC] Do not emit init / fini kernels in NVPTX libc
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Nov 13 07:24:18 PST 2023
Author: Joseph Huber
Date: 2023-11-13T09:24:02-06:00
New Revision: 9a6517e63a211080335f5226a53523c80d7168b8
URL: https://github.com/llvm/llvm-project/commit/9a6517e63a211080335f5226a53523c80d7168b8
DIFF: https://github.com/llvm/llvm-project/commit/9a6517e63a211080335f5226a53523c80d7168b8.diff
LOG: [libc][NFC] Do not emit init / fini kernels in NVPTX libc
Summray:
A recent patch upgrades the NVPTX ctor / dtor lowering pass to emit
kernels so other languages can call them. We do this manually in `libc`
so we do not need this. Use the provided flag to disable this step to
keep the created kernels cleaner.
Added:
Modified:
libc/cmake/modules/LLVMLibCObjectRules.cmake
Removed:
################################################################################
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index cf5097e23a20453..d5df27a2dcb4341 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -89,6 +89,7 @@ function(get_nvptx_compile_options output_var gpu_arch)
set(nvptx_options "")
list(APPEND nvptx_options "-march=${gpu_arch}")
list(APPEND nvptx_options "-Wno-unknown-cuda-version")
+ list(APPEND nvptx_options "SHELL:-mllvm -nvptx-emit-init-fini-kernel=false")
if(${gpu_arch} STREQUAL "sm_35")
list(APPEND nvptx_options "--cuda-feature=+ptx60")
elseif(${gpu_arch} STREQUAL "sm_37")
More information about the libc-commits
mailing list