[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
Mon Jan 23 14:46:15 PST 2023
jhuber6 updated this revision to Diff 491514.
jhuber6 added a comment.
Adding message if we didn't find any plugins. Usually happens if the paths are wrong.
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
@@ -265,6 +265,16 @@
FAILURE_MESSAGE("Consult https://openmp.llvm.org/design/Runtimes.html "
"for debugging options.\n");
+ if (PM->RTLs.AllRTLs.empty()) {
+ FAILURE_MESSAGE("Could not load any device plugins.\n");
+ } else if (PM->RTLs.UsedRTLs.empty()) {
+ FAILURE_MESSAGE("None of the images ( ");
+ for (auto &[Image, Info] : PM->Images)
+ fprintf(stderr, "%s ",
+ (!Info.Arch || *Info.Arch == '\0') ? "(empty) " : Info.Arch);
+ fprintf(stderr, "\n");
+ }
+
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.491514.patch
Type: text/x-patch
Size: 899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230123/3ec81331/attachment.bin>
More information about the Openmp-commits
mailing list