[Openmp-commits] [PATCH] D109304: [OpenMP][libomptarget] Add __tgt_target_return_t enum for __tgt_target_XXX return int
Ye Luo via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Sep 10 13:12:41 PDT 2021
ye-luo added inline comments.
================
Comment at: openmp/libomptarget/src/interface.cpp:24-34
+/// return flags of __tgt_target_XXX public APIs
+enum __tgt_target_return_t : int {
+ /// successful offload executed on a target device
+ OMP_TGT_SUCCESS = 0,
+ /// offload may not execute on the requested target device
+ /// this scenario can be caused by the device not available or unsupported
+ /// as described in the Execution Model in the specifcation
----------------
grokos wrote:
> This should be moved to `include/omptarget.h` - that's where we currently define `OFFLOAD_SUCCESS` and `OFFLOAD_FAIL`. `OMP_TGT_SUCCESS` and `OMP_TGT_FAIL` are the values which are checked to decided whether offloading has been successful or we should fallback to the host, so their definitions should reside in the header file that the outside world will include. Meanwhile, `OFFLOAD_SUCCESS` and `OFFLOAD_FAIL` are no longer used for inter-component communication, so we can move them to `private.h` or some new header file (do that as part of D109277).
yes. I think after this patch OFFLOAD_SUCCESS/OFFLOAD_FAIL are only for libomptarget internal use, it will be shared between the plugin and libomptarget and thus needs to be on a separate header file instead of inside `private.h`. Will do the change as part of D109277
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109304/new/
https://reviews.llvm.org/D109304
More information about the Openmp-commits
mailing list