[Openmp-commits] [PATCH] D144521: [OpenMP][AMDGPU] More detail in AMDGPU kernel launch info

Jan-Patrick Lehr via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Feb 23 08:42:24 PST 2023


jplehr added inline comments.


================
Comment at: openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp:377
+  utils::KernelMetaDataTy getKernelInfo(StringRef Identifier) const {
+    return KernelInfoMap.at(Identifier);
+  }
----------------
jhuber6 wrote:
> Doesn't this crash if the identifier is not present? Should it be a `std::optional` or something?
Good catch. Yeah, I think this should be an `Expected<T>` or so, as, should we not have an entry for the identifier in the map, then we did not find info for it in the image.
This would more or less mean that there is something weird in the image AFAICT as there was no metadata for the kernel with that identifier.
So, we would return an `Error` in the plugin in that case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144521/new/

https://reviews.llvm.org/D144521



More information about the Openmp-commits mailing list