[Openmp-commits] [PATCH] D31206: [OpenMP] CUDA plugin: More descriptive error messages
George Rokos via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Mar 21 13:34:27 PDT 2017
grokos created this revision.
grokos added a project: OpenMP.
Herald added a subscriber: rengolin.
When a kernel execution fails, the CUDA plugin prints a more descriptive message about the nature of the failure.
Repository:
rL LLVM
https://reviews.llvm.org/D31206
Files:
libomptarget/plugins/cuda/src/rtl.cpp
Index: libomptarget/plugins/cuda/src/rtl.cpp
===================================================================
--- libomptarget/plugins/cuda/src/rtl.cpp
+++ libomptarget/plugins/cuda/src/rtl.cpp
@@ -646,8 +646,10 @@
DP("Launch of entry point at " DPxMOD " successful!\n",
DPxPTR(tgt_entry_ptr));
- if (cudaDeviceSynchronize() != cudaSuccess) {
- DP("Kernel execution error at " DPxMOD ".\n", DPxPTR(tgt_entry_ptr));
+ cudaError_t sync_error = cudaDeviceSynchronize();
+ if (sync_error != cudaSuccess) {
+ DP("Kernel execution error at " DPxMOD ", %s.\n", DPxPTR(tgt_entry_ptr),
+ sync_error);
return OFFLOAD_FAIL;
} else {
DP("Kernel execution at " DPxMOD " successful!\n", DPxPTR(tgt_entry_ptr));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31206.92536.patch
Type: text/x-patch
Size: 737 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170321/95eddd3a/attachment.bin>
More information about the Openmp-commits
mailing list