[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
Mon Aug 23 11:48:12 PDT 2021
ye-luo added inline comments.
================
Comment at: openmp/libomptarget/include/omptargetplugin.h:160
+// {
+void *__tgt_rtl_create_event(int32_t ID, __tgt_async_info *AsyncInfo);
+
----------------
Please remove AsyncInfo which is not used.
================
Comment at: openmp/libomptarget/include/omptargetplugin.h:169
+int32_t __tgt_rtl_sync_event(int32_t ID, void *Event,
+ __tgt_async_info *AsyncInfo);
+
----------------
Please remove AsyncInfo which is not used.
================
Comment at: openmp/libomptarget/include/omptargetplugin.h:172
+int32_t __tgt_rtl_destroy_event(int32_t ID, void *Event,
+ __tgt_async_info *AsyncInfo);
+// }
----------------
Please remove AsyncInfo which is not used. If left, more confusion got added.
================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:1398
+ // API document, that argument has to be 0x0.
+ CUresult Err = cuStreamWaitEvent(Stream, Event, 0);
+ if (Err != CUDA_SUCCESS) {
----------------
I feel better to avoid hard-code 0.
better to check if CU_EVENT_WAIT_DEFAULT exists, if not, set CU_EVENT_WAIT_DEFAULT to 0.
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