[Openmp-commits] [PATCH] D77951: [OpenMP] Refined CUDA plugin to put all CUDA operations into class

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Apr 12 18:10:26 PDT 2020


tianshilei1992 marked 2 inline comments as done.
tianshilei1992 added inline comments.


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:247
+    return true;
+  }
+};
----------------
jdoerfert wrote:
> We check already in `resizeStreamPool`. Just return if it worked or not there. 
Actually the failure in `resizeStreamPool` will not impact its return. Those checks would only print out some messages but not aborting the program. Actually, I'm very not sure whether we need to abort the whole program as long as one CUDA operation returns error. From my point of view, I think we should. WDYT?


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:870
+      return OFFLOAD_FAIL;
     }
 
----------------
jdoerfert wrote:
> You can make `checkResult` variadic in a separate commit to reuse it here. It could even be a macro if that makes it easier.
Actually I'm thinking to improve it. Will do in another patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77951





More information about the Openmp-commits mailing list