[Openmp-commits] [PATCH] D42686: [libomptarget] Only use CUDA Driver API
Jonas Hahnfeld via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 30 06:45:39 PST 2018
Hahnfeld 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;
----------------
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.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D42686
More information about the Openmp-commits
mailing list