[Openmp-commits] [PATCH] D108528: [OpenMP][Offloading] Add support for event related interfaces

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Aug 28 12:37:21 PDT 2021


ye-luo accepted this revision.
ye-luo added inline comments.
This revision is now accepted and ready to land.


================
Comment at: openmp/libomptarget/src/device.cpp:560
+
+  return OFFLOAD_SUCCESS;
+}
----------------
tianshilei1992 wrote:
> ye-luo wrote:
> > If there is no event support. Should createEvent being called? if it should not be called, OFFLOAD_FAIL is better. I don't have deep thought on this. What do you think?
> It will be called anyway. We will not check (for now) if a feature is supported before calling it.
Calling events related APIs without actually plugin support would generally be considered undefined behaviors. So it is better to avoid calls.

When a device is initialized, we can attempt creating an event. If it remains nullptr, we can flag events not supported in this device.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108528/new/

https://reviews.llvm.org/D108528



More information about the Openmp-commits mailing list