[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
       
    Sat Aug 28 13:22:35 PDT 2021
    
    
  
tianshilei1992 marked an inline comment as done.
tianshilei1992 added inline comments.
================
Comment at: openmp/libomptarget/src/device.cpp:560
+
+  return OFFLOAD_SUCCESS;
+}
----------------
ye-luo wrote:
> 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.
If a plugin doesn't support event mechanism, it simply returns `OFFLOAD_SUCCESS` for all interfaces. It is a consistent behavior.
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