<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I guess your X86 platform doesn’t have CUDA installed. This issue will not be exposed if the system doesn’t have CUDA. I’ll submit a patch.<div class=""><br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Regards,<br class="">Shilei<br class=""></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Mar 18, 2021, at 5:43 PM, Kelvin Li <<a href="mailto:kli@ca.ibm.com" class="">kli@ca.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10pt"><div dir="ltr" class="">One more data point. I repeated the builds on the x86 platform. With LLVM_TARGETS_TO_BUILD="X86", the test is "UNSUPPORTED" (as expected). With LLVM_TARGETS_TO_BUILD="ALL", the test actually ran and passed.</div>
<div class="mail-signature-container" dir="ltr"> </div>
<div class="mail-signature-container" dir="ltr">Thanks,<br class="">Kelvin</div>
<div dir="ltr" class=""> </div>
<div dir="ltr" class=""> </div>
<blockquote data-history-content-modified="1" data-history-expanded="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" class="">----- Original message -----<br class="">From: Shilei Tian <<a href="mailto:tianshilei1992@gmail.com" class="">tianshilei1992@gmail.com</a>><br class="">To: Joachim Protze <<a href="mailto:protze.joachim@gmail.com" class="">protze.joachim@gmail.com</a>><br class="">Cc: Kelvin Li <<a href="mailto:kli@ca.ibm.com" class="">kli@ca.ibm.com</a>>, <a href="mailto:openmp-dev@lists.llvm.org" class="">openmp-dev@lists.llvm.org</a><br class="">Subject: [EXTERNAL] Re: [Openmp-dev] LIT failure: clang/test/Driver/openmp-offload-gpu.c<br class="">Date: Thu, Mar 18, 2021 17:24<br class=""> <br class=""> <!--Notes ACF
<meta http-equiv="Content-Type" content="text/html; charset=utf8" >--> There is dummy file in <font face="Courier New" class="">clang/test/Driver/Inputs/libomptarget</font>. It also has multiple dummy CUDAs. For this specific case, it should not raise the error because passing -S should only contain preprocess and compilation.
<div class=""><div class=""><div class="">
<div class=""><div dir="auto" class=""><div class="">Regards,<br class="">Shilei</div></div></div>
<div class="">
<blockquote type="cite" class=""><div class="">On Mar 18, 2021, at 5:19 PM, Joachim Protze <<a href="mailto:protze.joachim@gmail.com" target="_blank" class="">protze.joachim@gmail.com</a>> wrote:</div>
<div class=""><div class="">The test complains, that libomptarget-nvptx-sm_60.bc cannot be found.<br class="">How should it be found, if libomptarget is not built?<br class=""><br class="">- Joachim<br class=""><br class="">Am 18.03.21 um 22:16 schrieb Shilei Tian:
<blockquote type="cite" class="">It’s clang driver test, so it doesn’t need to have OpenMP enabled. On Phab, IIRC, by default it’s ALL. I did remember I updated the patch because of the driver case, and later it all passed.<br class=""><br class="">Regards,<br class="">Shilei<br class="">
<blockquote type="cite" class="">On Mar 18, 2021, at 5:14 PM, Joachim Protze <<a href="mailto:protze.joachim@gmail.com" target="_blank" class="">protze.joachim@gmail.com</a>> wrote:<br class=""><br class="">The REQUIRES lines at the top of the file specify, that all targets need<br class="">to be available so that the test is supported.<br class=""><br class="">To fulfill the dependency with the bitcode library, this should be added<br class="">as another REQUIREment of the test.<br class=""><br class="">I assume that phabricator and your local test builds include building<br class="">the OpenMP runtime/project?<br class=""><br class="">- Joachim<br class=""><br class=""><br class="">Am 18.03.21 um 21:38 schrieb Shilei Tian via Openmp-dev:
<blockquote type="cite" class="">Hi Kelvin,<br class=""><br class="">If only building with target PPC, this case will not be run because clang cannot process CUDA code.<br class="">I think it’s related to our recent change that the bitcode library is required when building OpenMP program so I updated the driver. However it passed the test before (locally and on Phab). I’ll try to reproduce and fix it accordingly.<br class=""><br class="">Regards,<br class="">Shilei<br class="">
<blockquote type="cite" class="">On Mar 18, 2021, at 3:14 PM, Kelvin Li via Openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org" target="_blank" class="">openmp-dev@lists.llvm.org</a>> wrote:<br class=""><br class="">Hi,<br class=""><br class="">I don't know the LIT test infrastructure well enough. Recently, openmp-offload-gpu.c started to fail in our downstream test. I find that if I build with LLVM_TARGETS_TO_BUILD="PowerPC", the test is "UNSUPPORTED". If I build with LLVM_TARGETS_TO_BUILD="ALL", the test fails. In both cases, NO -DLLVM_ENABLE_RUNTIMES="openmp" is specified in the cmake command<br class=""><br class="">Any clues of the reason?<br class=""><br class="">The error message:<br class=""><br class="">Exit Code: 1<br class="">Command Output (stderr):<br class="">--<br class="">llvm-project/clang/test/Driver/openmp-offload-gpu.c:150:25: error: CHK-NOLIBDEVICE-NOT: excluded string found in input<br class="">// CHK-NOLIBDEVICE-NOT: error:{{.*}}sm_60<br class=""> ^<br class=""><stdin>:6:8: note: found here<br class="">clang: error: No library 'libomptarget-nvptx-sm_60.bc' found in the default clang lib directory or in LIBRARY_PATH. Please use --libomptarget-nvptx-bc-path to specify nvptx bitcode library.<br class=""> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class=""><br class="">Kelvin<br class=""><br class="">_______________________________________________<br class="">Openmp-dev mailing list<br class=""><a href="mailto:Openmp-dev@lists.llvm.org" target="_blank" class="">Openmp-dev@lists.llvm.org</a><br class=""><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_openmp-2Ddev&d=DwQFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=yebGUrvFJWJ7GtM9woczVA&m=yn9zy059XfSjYVLwKsM9SSxIsdiVF5fbAHwujOzxde0&s=j6cqZBFu5n5meaovjrIcLKjJb7D_kT0JhAVJCz3EQNM&e=" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a></blockquote><br class=""><br class=""><br class="">_______________________________________________<br class="">Openmp-dev mailing list<br class=""><a href="mailto:Openmp-dev@lists.llvm.org" target="_blank" class="">Openmp-dev@lists.llvm.org</a><br class=""><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_openmp-2Ddev&d=DwQFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=yebGUrvFJWJ7GtM9woczVA&m=yn9zy059XfSjYVLwKsM9SSxIsdiVF5fbAHwujOzxde0&s=j6cqZBFu5n5meaovjrIcLKjJb7D_kT0JhAVJCz3EQNM&e=" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br class=""> </blockquote></blockquote><br class=""> </blockquote></div></div></blockquote></div></div></div></div></blockquote>
<div dir="ltr" class=""> </div></div><br class="">
</div></blockquote></div><br class=""></div></body></html>