[libc-commits] [libc] 0e2103a - [libc][NFC] Remove unused CMake for gpu math
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Sat Jun 7 07:25:37 PDT 2025
Author: Joseph Huber
Date: 2025-06-07T09:25:27-05:00
New Revision: 0e2103ac5c7c62341b499dc2fb402715ccdf9021
URL: https://github.com/llvm/llvm-project/commit/0e2103ac5c7c62341b499dc2fb402715ccdf9021
DIFF: https://github.com/llvm/llvm-project/commit/0e2103ac5c7c62341b499dc2fb402715ccdf9021.diff
LOG: [libc][NFC] Remove unused CMake for gpu math
Added:
Modified:
libc/src/math/amdgpu/CMakeLists.txt
libc/src/math/nvptx/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/src/math/amdgpu/CMakeLists.txt b/libc/src/math/amdgpu/CMakeLists.txt
index 4d81b7654f826..e2cd3b99c3037 100644
--- a/libc/src/math/amdgpu/CMakeLists.txt
+++ b/libc/src/math/amdgpu/CMakeLists.txt
@@ -1,21 +1,3 @@
-# Math functions not yet available in the libc project, or those not yet tuned
-# for GPU workloads are provided as wrappers over vendor libraries. If we find
-# them ahead of time we will import them statically. Otherwise, we will keep
-# them as external references and expect them to be resolved by the user when
-# they compile. In the future,we will use implementations from the 'libc'
-# project and not provide these wrappers.
-find_package(AMDDeviceLibs QUIET HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
-if(AMDDeviceLibs_FOUND)
- message(STATUS "Found the ROCm device library. Implementations falling back "
- "to the vendor libraries will be resolved statically.")
- get_target_property(ocml_path ocml IMPORTED_LOCATION)
- set(bitcode_link_flags
- "SHELL:-Xclang -mlink-builtin-bitcode -Xclang ${ocml_path}")
-else()
- message(STATUS "Could not find the ROCm device library. Unimplemented "
- "functions will be an external reference to the vendor libraries.")
-endif()
-
add_entrypoint_object(
ceil
SRCS
diff --git a/libc/src/math/nvptx/CMakeLists.txt b/libc/src/math/nvptx/CMakeLists.txt
index 949232ea2aaea..fcb2870b4bb1c 100644
--- a/libc/src/math/nvptx/CMakeLists.txt
+++ b/libc/src/math/nvptx/CMakeLists.txt
@@ -1,22 +1,3 @@
-# Math functions not yet available in the libc project, or those not yet tuned
-# for GPU workloads are provided as wrappers over vendor libraries. If we find
-# them ahead of time we will import them statically. Otherwise, we will keep
-# them as external references and expect them to be resolved by the user when
-# they compile. In the future,we will use implementations from the 'libc'
-# project and not provide these wrappers.
-if(CUDAToolkit_FOUND)
- set(libdevice_path ${CUDAToolkit_BIN_DIR}/../nvvm/libdevice/libdevice.10.bc)
- if (EXISTS ${libdevice_path})
- message(STATUS "Found the CUDA device library. Implementations falling back "
- "to the vendor libraries will be resolved statically.")
- set(bitcode_link_flags
- "SHELL:-Xclang -mlink-builtin-bitcode -Xclang ${libdevice_path}")
- endif()
-else()
- message(STATUS "Could not find the CUDA device library. Unimplemented "
- "functions will be an external reference to the vendor libraries.")
-endif()
-
add_entrypoint_object(
ceil
SRCS
More information about the libc-commits
mailing list