[Openmp-commits] [PATCH] D142369: [Libomptarget] Emit a special warning when no images are found
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Mar 17 08:38:26 PDT 2023
jhuber6 updated this revision to Diff 506095.
jhuber6 added a comment.
Updating, error message now looks like this.
Libomptarget error: Consult https://openmp.llvm.org/design/Runtimes.html for debugging options.
Libomptarget error: No images with a supported architecture found (sm_70)
Libomptarget error: Source location information not present. Compile with -g or -gline-tables-only.
Libomptarget fatal error 1: failure of target construct while offloading is mandatory
[1] 159574 IOT instruction (core dumped) OMP_TARGET_OFFLOAD=mandatory ./a.out
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142369/new/
https://reviews.llvm.org/D142369
Files:
openmp/libomptarget/src/omptarget.cpp
Index: openmp/libomptarget/src/omptarget.cpp
===================================================================
--- openmp/libomptarget/src/omptarget.cpp
+++ openmp/libomptarget/src/omptarget.cpp
@@ -274,6 +274,16 @@
FAILURE_MESSAGE("Consult https://openmp.llvm.org/design/Runtimes.html "
"for debugging options.\n");
+ if (PM->RTLs.UsedRTLs.empty()) {
+ llvm::SmallVector<llvm::StringRef> Archs;
+ llvm::transform(PM->Images, std::back_inserter(Archs),
+ [](const auto &x) {
+ return !x.second.Arch ? "empty" : x.second.Arch;
+ });
+ FAILURE_MESSAGE("No images with a supported architecture. Found ");
+ fprintf(stderr, "(%s)\n", llvm::join(Archs, ",").c_str());
+ }
+
SourceInfo Info(Loc);
if (Info.isAvailible())
fprintf(stderr, "%s:%d:%d: ", Info.getFilename(), Info.getLine(),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142369.506095.patch
Type: text/x-patch
Size: 951 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230317/e040680f/attachment.bin>
More information about the Openmp-commits
mailing list