aboutsummaryrefslogtreecommitdiff
path: root/openmp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-12-28 21:36:09 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-12-28 21:36:09 +0000
commitd1cd005ec593f1a60e89b156066fa53561879d28 (patch)
treea5888ad82244a4e59bb489b7595655788deedc35 /openmp
parent8c11fb3ed419a8c48f0f36af6e0a621aa75be320 (diff)
[OPENMP][NVPTX]Added/fixed debugging messages, NFC.
Summary: Added or fixed new/old debugging messages for the better diagnostics. Reviewers: gtbercea, kkwli0, grokos Reviewed By: grokos Subscribers: caomhin, guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D56102 llvm-svn: 350137
Diffstat (limited to 'openmp')
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu2
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu4
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/supporti.h4
3 files changed, 7 insertions, 3 deletions
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
index b0b129081129..86746810547b 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
@@ -81,6 +81,7 @@ EXTERN void __kmpc_kernel_init(int ThreadLimit, int16_t RequiresOMPRuntime) {
}
EXTERN void __kmpc_kernel_deinit(int16_t IsOMPRuntimeInitialized) {
+ PRINT0(LD_IO, "call to __kmpc_kernel_deinit\n");
ASSERT0(LT_FUSSY, IsOMPRuntimeInitialized,
"Generic always requires initialized runtime.");
// Enqueue omp state object for use by another team.
@@ -190,5 +191,6 @@ EXTERN void __kmpc_spmd_kernel_deinit_v2(int16_t RequiresOMPRuntime) {
// Return true if the current target region is executed in SPMD mode.
EXTERN int8_t __kmpc_is_spmd_exec_mode() {
+ PRINT0(LD_IO | LD_PAR, "call to __kmpc_is_spmd_exec_mode\n");
return isSPMDMode();
}
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu
index fbcbeab8eacf..8aea26d2f70d 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu
@@ -284,8 +284,10 @@ EXTERN bool __kmpc_kernel_parallel(void **WorkFn,
*WorkFn = omptarget_nvptx_workFn;
// If this is the termination signal from the master, quit early.
- if (!*WorkFn)
+ if (!*WorkFn) {
+ PRINT0(LD_IO | LD_PAR, "call to __kmpc_kernel_parallel finished\n");
return false;
+ }
// Only the worker threads call this routine and the master warp
// never arrives here. Therefore, use the nvptx thread id.
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/supporti.h b/openmp/libomptarget/deviceRTLs/nvptx/src/supporti.h
index e2ea2d15faf9..06c8dae6d7dd 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/supporti.h
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/supporti.h
@@ -238,8 +238,8 @@ INLINE unsigned long PadBytes(unsigned long size,
INLINE void *SafeMalloc(size_t size, const char *msg) // check if success
{
void *ptr = malloc(size);
- PRINT(LD_MEM, "malloc data of size %zu for %s: 0x%llx\n", size, msg,
- (unsigned long long)ptr);
+ PRINT(LD_MEM, "malloc data of size %llu for %s: 0x%llx\n",
+ (unsigned long long)size, msg, (unsigned long long)ptr);
return ptr;
}