llvm-project/openmp/libomptarget/plugins/cuda
Michael Kruse 78769ec403 [libomptarget] Harmonize emitting CUDA errors and general debug messages.
Ensures that CUDA fail reasons (such as "No CUDA-capable device detected")
are printed together with libomptarget's debug message
(e.g. "Error when setting CUDA context"). Previously, the former was
printed only in CMAKE_BUILD_TYPE=Debug builds while the latter was
enabled by LIBOMPTARGET_ENABLE_DEBUG.

With this change, also only call cuGetErrorString when the error will be
printed.

Suggested-by: Ye Luo <xw111luoye@gmail.com>

Differential Revision: https://reviews.llvm.org/D65687

llvm-svn: 367910
2019-08-05 19:12:10 +00:00
..
src [libomptarget] Harmonize emitting CUDA errors and general debug messages. 2019-08-05 19:12:10 +00:00
CMakeLists.txt [libomptarget] Harmonize emitting CUDA errors and general debug messages. 2019-08-05 19:12:10 +00:00