<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Allow missing bundles when using OpenMP offload"
   href="https://bugs.llvm.org/show_bug.cgi?id=51469">51469</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Allow missing bundles when using OpenMP offload
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Clang Compiler Support
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>xw111luoye@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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:
<a href="https://github.com/ye-luo/openmp-target/tree/master/tests/linking/missing_bundles">https://github.com/ye-luo/openmp-target/tree/master/tests/linking/missing_bundles</a>

$ 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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>