This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Trim error messages in CUDA plugin
ClosedPublic

Authored by jhuber6 on Mar 29 2021, 8:16 AM.

Details

Summary

Remove some of the error messages printed when the CUDA plugin fails. The current error messages can be confusing because they are the first error messages printed after the async stream finds an error. This means that the printed values aren't related to what caused the issue, but are simply the last asyncronous operation that succeeded on the device. Remove these as they can be misleading.

Diff Detail

Event Timeline

jhuber6 created this revision.Mar 29 2021, 8:16 AM
jhuber6 requested review of this revision.Mar 29 2021, 8:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2021, 8:16 AM

How do error messages/info output look before & after?

How do error messages/info output look before & after?

Before, with the zaxpy example in the documentation

CUDA error: Error when copying data from device to host. Pointers: host = 0x00007ffe60de5668, device = 0x00007f4087000000, size = 16
CUDA error: an illegal memory access was encountered 
Libomptarget error: Copying data from device failed.
Libomptarget error: Call to targetDataEnd failed, abort target.
Libomptarget error: Failed to process data after launching the kernel.
Libomptarget error: Run with LIBOMPTARGET_DEBUG=4 to dump host-target pointer mappings.
zaxpy.cpp:10:1: Libomptarget fatal error 1: failure of target construct while offloading is mandatory
Aborted (core dumped)

After

CUDA error: an illegal memory access was encountered 
Libomptarget error: Copying data from device failed.
Libomptarget error: Call to targetDataEnd failed, abort target.
Libomptarget error: Failed to process data after launching the kernel.
Libomptarget error: Run with LIBOMPTARGET_DEBUG=4 to dump host-target pointer mappings.
zaxpy.cpp:10:1: Libomptarget fatal error 1: failure of target construct while offloading is mandatory
Aborted (core dumped)
This revision is now accepted and ready to land.Mar 29 2021, 9:00 AM
This revision was landed with ongoing or failed builds.Mar 29 2021, 9:20 AM
This revision was automatically updated to reflect the committed changes.