When offloading is mandatory we can emit a more helpful message if we
did not find any compatible images with the user's system.
Fixes #60221
Differential D142369
[Libomptarget] Emit a special warning when no images are found jhuber6 on Jan 23 2023, 7:51 AM. Authored by
Details When offloading is mandatory we can emit a more helpful message if we Fixes #60221
Diff Detail
Event TimelineComment Actions This will fire anytime we fail with a mandatory offloading but there were no images registered to a plugin. Maybe this could happen if the plugin failed to load the x86 plugin. That plugin uses the architecture just like any other, but it's usually empty. I should maybe add a special string if it's empty. Comment Actions When libomptarget failed to load the amd plugin due to missing hsa runtime so files. yeluo@epyc-server:~$ clang++ -fopenmp --offload-arch=gfx90a main.cpp yeluo@epyc-server:~$ OMP_TARGET_OFFLOAD=mandatory ./a.out Libomptarget error: Consult https://openmp.llvm.org/design/Runtimes.html for debugging options. Libomptarget error: None of the images found are compatible: gfx90a 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 None of the images found are compatible: gfx90a this line is a bit hard to digest. Could you print a list of loaded plugins and a list of images. Comment Actions The following is the list of images found. I could try to make that more explicit. And by default we should have every plugin loaded. Comment Actions By list all the successfully loaded plugins and images. I can figure out if the issue was caused by missing plugin or missing image. Comment Actions It's tough to tell which image was intended for which plugin. The best we could do is print out every plugin, I guess this can happen if the library paths aren't set up correctly. Printing this would require making the RTLName present in every build. Maybe I can just print a special message if we didn't find any plugins. Since I think that's more likely to be the cause of failure vs. a single one. Comment Actions Adding message if we didn't find any plugins. Usually happens if the paths are wrong. Comment Actions It doesn't print well $ OMP_TARGET_OFFLOAD=mandatory ./a.out Libomptarget error: Consult https://openmp.llvm.org/design/Runtimes.html for debugging options. Libomptarget error: None of the images ( gfx90a 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
Comment Actions 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 Comment Actions Still prefer a more clear message.
|
None of the images, what?