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

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 27 18:00:32 PDT 2021


tianshilei1992 added inline comments.


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:132
 
+void *createEvent() {
+  CUevent Event = nullptr;
----------------
ye-luo wrote:
> tianshilei1992 wrote:
> > ye-luo wrote:
> > > I just realize that this one needs to be
> > > int createEvent(void** createEvent)
> > > and the return code needs to indicate the success/failure of cuEventCreate call.
> > > 
> > > This is probably my last concern.
> > That's a good one. Done.
> Should the return type int as others?
Sure


================
Comment at: openmp/libomptarget/src/device.cpp:560
+
+  return OFFLOAD_SUCCESS;
+}
----------------
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.


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