Here is the output if I run llvm-objdump --offloading a.out
:
a.out: file format elf64-x86-64
OFFLOADING IMAGE [0]:
kind elf
arch sm_120
triple nvptx64-nvidia-cuda
producer openmp
And here is the output for OMP_TARGET_OFFLOAD=mandatory ./a.out
after export LIBOMPTARGET_DEBUG=1
and compiling with DLIBOMPTARGET_ENABLE_DEBUG=ON
:
omptarget --> Init offload library!
OMPT --> Entering connectLibrary
OMPT --> OMPT: Trying to load library libomp.so
OMPT --> OMPT: Trying to get address of connection routine ompt_libomp_connect
OMPT --> OMPT: Library connection handle = 0x70ef79559e60
OMPT --> Exiting connectLibrary
omptarget --> Loading RTLs...
omptarget --> RTLs loaded!
PluginInterface --> Failure to check validity of image 0x5651b5deed20: Invalid CUDA addressing modePluginInterface --> Failure to check validity of image 0x5651b5deed20: Invalid CUDA addressing modePluginInterface --> Failure to check validity of image 0x5651b5deed20: Invalid CUDA addressing modeomptarget --> No RTL found for image 0x00005651b5dea120!
omptarget --> Done registering entries!
omptarget --> Entering target region for device -1 with entry point 0x00005651b5dea047
omptarget --> Use default device id 0
omptarget --> Call to omp_get_num_devices returning 0
omptarget --> omp_get_num_devices() == 0 but offload is manadatory
omptarget error: Consult https://openmp.llvm.org/design/Runtimes.html for debugging options.
omptarget error: No images found compatible with the installed hardware. Segmentation fault (core dumped)
Additionally I noticed some CMake warnings during compilation. I don’t know if they are critical but here they are:
CMake Warning at /home/jfuchs/tools/llvm-compilation/llvm-project/compiler-rt/cmake/Modules/CompilerRTUtils.cmake:335 (message):
LLVMTestingSupport not found in LLVM_AVAILABLE_LIBS
Call Stack (most recent call first):
CMakeLists.txt:29 (load_llvm_config)
CMake Warning at /home/jfuchs/tools/llvm-compilation/llvm-project/compiler-rt/cmake/Modules/CompilerRTUtils.cmake:335 (message):
LLVMTestingSupport not found in LLVM_AVAILABLE_LIBS
Call Stack (most recent call first):
CMakeLists.txt:29 (load_llvm_config)
CMake Warning (dev) at /usr/share/cmake-3.28/Modules/GNUInstallDirs.cmake:243 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
/home/jfuchs/tools/llvm-compilation/llvm-project/compiler-rt/cmake/base-config-ix.cmake:9 (include)
CMakeLists.txt:25 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning at /home/jfuchs/tools/llvm-compilation/llvm-project/compiler-rt/cmake/Modules/CompilerRTUtils.cmake:335 (message):
LLVMTestingSupport not found in LLVM_AVAILABLE_LIBS
Call Stack (most recent call first):
CMakeLists.txt:29 (load_llvm_config)
CMake Warning at /home/jfuchs/tools/llvm-compilation/llvm-project/libc/test/CMakeLists.txt:13 (message):
Cannot build libc GPU tests, missing loader.
CMake Warning (dev) at /usr/share/cmake-3.28/Modules/GNUInstallDirs.cmake:243 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
/home/jfuchs/tools/llvm-compilation/llvm-project/llvm/cmake/modules/AddLLVM.cmake:1 (include)
CMakeLists.txt:174 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning at /home/jfuchs/tools/llvm-compilation/llvm-project/offload/unittests/CMakeLists.txt:104 (message):
Cannot run conformance tests without the LLVM C library
Call Stack (most recent call first):
/home/jfuchs/tools/llvm-compilation/llvm-project/offload/unittests/Conformance/CMakeLists.txt:8 (add_conformance_test)
CMake Warning:
Manually-specified variables were not used by the project:
LIBCXX_HAS_GCC_S_LIB
Thank you, let me know if you need any other logs!