[Openmp-commits] [PATCH] D31206: [OpenMP] CUDA plugin: More descriptive error messages
George Rokos via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Mar 22 10:48:42 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL298527: [OpenMP] CUDA plugin: More descriptive error messages (authored by grokos).
Changed prior to commit:
https://reviews.llvm.org/D31206?vs=92655&id=92658#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31206
Files:
openmp/trunk/libomptarget/plugins/cuda/src/rtl.cpp
Index: openmp/trunk/libomptarget/plugins/cuda/src/rtl.cpp
===================================================================
--- openmp/trunk/libomptarget/plugins/cuda/src/rtl.cpp
+++ openmp/trunk/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),
+ cudaGetErrorString(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.92658.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170322/6e2ac71c/attachment.bin>
More information about the Openmp-commits
mailing list