[llvm-bugs] [Bug 51469] New: Allow missing bundles when using OpenMP offload

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 12 19:54:07 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51469

            Bug ID: 51469
           Summary: Allow missing bundles when using OpenMP offload
           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

Right now all the source codes require being compiled with -fopenmp-targets.
This adds challenges to compile source codes no offload bits but struggles with
-fopenmp-targets.

reproducer:
https://github.com/ye-luo/openmp-target/tree/master/tests/linking/missing_bundles

$ clang++ -fopenmp -fopenmp-targets=nvptx64 -c foo.cpp
$ clang++ -fopenmp -c boo.cpp
$ clang++ -fopenmp -fopenmp-targets=nvptx64 main.cpp boo.o foo.o 
nvlink fatal   : Could not open input file '/tmp/foo-7e0588.cubin'
clang-14: error: nvlink command failed with exit code 1 (use -v to see
invocation)

In the linking script.
 "/ccs/proj/mat151/opt/llvm/master-latest/bin/clang-offload-bundler" -type=o
-targets=host-powerpc64le-unknown-linux-gnu,openmp-nvptx64 -inputs=boo.o
-outputs=boo-host-powerpc64le-unknown-linux-gnu.o,boo-openmp-nvptx64.cubin
-unbundle -allow-missing-bundles

"-allow-missing-bundles" allows missing device pieces. But the script line of
nvlink always requests the cubin file. This is the root cause of the above
error.

-- 
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/20210813/54510551/attachment.html>


More information about the llvm-bugs mailing list