[Mlir-commits] [mlir] [mlir][Target] Support Fatbin target for static nvptxcompiler (PR #118044)
Zichen Lu
llvmlistbot at llvm.org
Sun Dec 1 23:36:59 PST 2024
================
@@ -66,27 +66,39 @@ if ("NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
set(MLIR_CUDAToolkit_ROOT ${CUDAToolkit_LIBRARY_ROOT})
endif()
- # Add the `nvptxcompiler` library.
+ # Add the `nvptxcompiler` library and the `nvfatbin` library.
if(MLIR_ENABLE_NVPTXCOMPILER)
# Find the `nvptxcompiler` library.
# TODO: Bump the MLIR CMake version to 3.25 and use `CUDA::nvptxcompiler_static`.
find_library(MLIR_NVPTXCOMPILER_LIB_PATH nvptxcompiler_static
PATHS ${CUDAToolkit_LIBRARY_DIR} NO_DEFAULT_PATH)
+ find_library(MLIR_NVFATBIN_LIB_PATH nvfatbin_static
+ PATHS ${CUDAToolkit_LIBRARY_DIR} NO_DEFAULT_PATH)
# Fail if `nvptxcompiler_static` couldn't be found.
if(MLIR_NVPTXCOMPILER_LIB_PATH STREQUAL "MLIR_NVPTXCOMPILER_LIB_PATH-NOTFOUND")
message(FATAL_ERROR
"Requested using the `nvptxcompiler` library backend but it couldn't be found.")
endif()
+ # Fail if `nvfatbin_static` couldn't be found.
+ if(MLIR_NVFATBIN_LIB_PATH STREQUAL "MLIR_NVFATBIN_LIB_PATH-NOTFOUND")
+ message(FATAL_ERROR
+ "Requested using the `nvfatbin` library backend but it couldn't be found.")
----------------
MikaOvO wrote:
Fixed, thanks!
https://github.com/llvm/llvm-project/pull/118044
More information about the Mlir-commits
mailing list