[OpenMP] Use LIBOMPTARGET_DEVICE_RTL_DEBUG env var to control debug messages on the...
authorGuansong Zhang <zhang.guansong@gmail.com>
Fri, 4 May 2018 19:29:28 +0000 (19:29 +0000)
committerGuansong Zhang <zhang.guansong@gmail.com>
Fri, 4 May 2018 19:29:28 +0000 (19:29 +0000)
commite1c7a46d5b55bbe870c0b9aa3a4f3d3ea396550e
tree1985f4673c689ab411b16cf0cfbad8203c4c1e8f
parent8e4958e760f0af8174d96ab940f2d01caf251528
[OpenMP] Use LIBOMPTARGET_DEVICE_RTL_DEBUG env var to control debug messages on the device side

Summary:
Enable the device side debug messages at compile time, use env var to control at runtime.

To achieve this, an environment data block is passed to the device lib when it is loaded.

By default, the message is off, to enable it, a user need to set LIBOMPDEVICE_DEBUG=1.

Reviewers: grokos

Reviewed By: grokos

Subscribers: openmp-commits

Tags: #openmp

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

llvm-svn: 331550
openmp/libomptarget/deviceRTLs/nvptx/src/debug.h
openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu
openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
openmp/libomptarget/plugins/cuda/src/rtl.cpp