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: unassignedclangb...@nondot.org
          Reporter: xw111lu...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to