This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][libomptarget] Fixed an issue that device sync is skipped if the kernel doesn't have any argument
ClosedPublic

Authored by tianshilei1992 on Feb 4 2021, 11:25 AM.

Details

Summary

Currently if there is not kernel argument, device synchronization will
be skipped. This can lead to two issues:

  1. If there is any device error, it will not be captured;
  2. The target region might end before the kernel is done, which is not spec conformant.

The test added in this patch only runs on NVPTX platform, although it will not
be executed by Phab at all. It also requires not which is not available on most
systems.

Diff Detail

Event Timeline

tianshilei1992 created this revision.Feb 4 2021, 11:25 AM
tianshilei1992 requested review of this revision.Feb 4 2021, 11:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2021, 11:25 AM
jdoerfert accepted this revision.Feb 4 2021, 11:47 AM

LGTM, one NIT below.

openmp/libomptarget/src/omptarget.cpp
1323

", and it is invoked asynchronously", really? Maybe the language is just confusing.

This revision is now accepted and ready to land.Feb 4 2021, 11:47 AM