[Openmp-commits] [PATCH] D134396: [OpenMP][libomptarget] New plugin infrastructure and new CUDA plugin

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 21 19:56:39 PDT 2022


tianshilei1992 added inline comments.


================
Comment at: openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp:1002
+GenericPluginTy &Plugin::get() {
+  static CUDAPluginTy CUDAPlugin;
+  assert(Plugin::isActive() && "Plugin is not active");
----------------
I'm not sure this is a good idea in terms of lifetime, but we can come back to this later once Joseph removes the "edge" between `libomptarget` and plugins when destructing `libomptarget`.


================
Comment at: openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp:1014
+    return ErrorStr;
+  } else if (Ret == CUDA_ERROR_INVALID_VALUE) {
+    REPORT("Unrecognized " GETNAME(TARGET_NAME) " error code: %d\n", ErrorCode);
----------------
no else after `return`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134396



More information about the Openmp-commits mailing list