[llvm-bugs] [Bug 42395] New: Incorrect linking of device code

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 25 14:42:16 PDT 2019


            Bug ID: 42395
           Summary: Incorrect linking of device code
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: xw111luoye at gmail.com
                CC: llvm-bugs at lists.llvm.org

I got the following error at runtime.

Target CUDA RTL --> Load data from image 0x00000000006ce450
Target CUDA RTL --> CUDA module successfully loaded!
Target CUDA RTL --> Loading
Libomptarget --> Unable to generate entries table for device id 0.
Libomptarget --> Failed to init globals on device 0
Libomptarget --> Failed to get device 0 ready

The issue is related to static linking. Target offload regions are compiled and
archived as static libraries. Then *.a are then linked together to create an
executable. Such an executable ran well in the past but no more. If I link
manually all the object files. The executable can run correctly.

The build and run recipe
mkdir build_clang_offload; cd build_clang_offload
make -j24 miniqmc

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190625/3a93a2a0/attachment.html>

More information about the llvm-bugs mailing list