[Openmp-commits] [PATCH] D42686: [libomptarget] Only use CUDA Driver API

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 30 06:51:04 PST 2018


grokos added inline comments.


================
Comment at: libomptarget/plugins/cuda/src/rtl.cpp:691-692
+    CUDA_ERR_STRING(sync_err);
+    assert(sync_err == CUDA_SUCCESS &&
+           "Unable to synchronize target execution!");
     return OFFLOAD_FAIL;
----------------
Hahnfeld wrote:
> grokos wrote:
> > This assertion is guaranteed to trip - it's inside an `if (sync_err != CUDA_SUCCESS)` - so it doesn't make sense to have it. Besides, if kernel execution fails, the plugin should just return `OFFLOAD_FAIL` to the parent runtime, not terminate the program.
> I know, I was just mimicking the same behavior of the previous `if` statement. If that's not what we want, we should probably remove the first assert as well.
Right, the previous assertion must be removed, it shouldn't be there.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D42686





More information about the Openmp-commits mailing list