[Openmp-commits] [PATCH] D33227: [OpenMP] libomptarget: move debugging dumps under control of environment variable OMP_TARGET_DEBUG

Sergey Dmitriev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jun 23 09:52:58 PDT 2017


sdmitriev added a comment.

In https://reviews.llvm.org/D33227#775572, @guansong wrote:

> In https://reviews.llvm.org/D33227#775415, @grokos wrote:
>
> > In https://reviews.llvm.org/D33227#775337, @guansong wrote:
> >
> > > Just to share what I have locally. I have OFFLOAD_DEBUG=1 for the plugin side debug messages, and DEVICE_DEBUG=1 for the deviceRTL side messages.
> >
> >
> > So are you suggesting that each plugin has its own env variable to turn debug output on/off?
>
>
> No. I am thinking one should be OK for all plugins.
>
> For LIBOMPTARGET_DEBUG, will it control the device side of the debug message later on?


Libomptarget itself does not have a device side part yet, but if we decide to add it in future I think it would be consistent to control all messages coming from it by LIBOMPTARGET_DEBUG setting.

> You call it "target", that gives me the impression it will. But maybe that is not the case. And LIBOMPOFFLOAD_DEBUG may be a better name.

No, the reason why it is named this way is actually different – it controls debugging messages from the libomptarget library, so it looks quite natural to call it LIBOMPTARGET_DEBUG.

> In my scenario, I do have two flags, one is for the host (actually the code is almost identical to yours), and one for the device.
> 
> The device side of the variable may need to be specific to each device. The one I have can work for GPU, but it may not work well for PHI. As in this case the device and host will share the same openmp runtime mechanism?
> 
>      

I guess you are talking about the device side RTL which is not directly related to libomptarget and plugins, right? If that is the case then I think we cannot restrict device libraries to use whatever they want. It should be fine to have device specific settings for each particular target.

LIBOMPTARGET_DEBUG is intended to control debugging messages for libomptarget and plugins only. Everything else is outside of its control.


https://reviews.llvm.org/D33227





More information about the Openmp-commits mailing list