[libc-commits] [libc] daa755b - [libc] Disable testing for NVPTX debug builds (#86856)

via libc-commits libc-commits at lists.llvm.org
Thu Mar 28 04:49:19 PDT 2024


Author: Joseph Huber
Date: 2024-03-28T06:49:15-05:00
New Revision: daa755ba7b7fe11e078f1e6f43d446234023f859

URL: https://github.com/llvm/llvm-project/commit/daa755ba7b7fe11e078f1e6f43d446234023f859
DIFF: https://github.com/llvm/llvm-project/commit/daa755ba7b7fe11e078f1e6f43d446234023f859.diff

LOG: [libc] Disable testing for NVPTX debug builds (#86856)

Summary:
Debug builds don't optimize out certain parts of the code that end up
making the GPU backend crash. This results in regular builds not being
successful just to build the testing objects. Disable them for now in
debug mode.

Added: 
    

Modified: 
    libc/cmake/modules/prepare_libc_gpu_build.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake
index bea6bb016491b6..20aca16990fc63 100644
--- a/libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -93,6 +93,11 @@ else()
 endif()
 set(LIBC_GPU_TARGET_ARCHITECTURE "${gpu_test_architecture}")
 
+# The NVPTX backend cannot currently handle objects created in debug mode.
+if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX AND CMAKE_BUILD_TYPE STREQUAL "Debug")
+  set(LIBC_GPU_TESTS_DISABLED TRUE)
+endif()
+
 # Identify the GPU loader utility used to run tests.
 set(LIBC_GPU_LOADER_EXECUTABLE "" CACHE STRING "Executable for the GPU loader.")
 if(LIBC_GPU_LOADER_EXECUTABLE)


        


More information about the libc-commits mailing list