[Openmp-commits] [PATCH] D110193: [RFC] Initial documentation for declare target indirect support.
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Sep 22 10:43:28 PDT 2021
jdoerfert added inline comments.
================
Comment at: openmp/libomptarget/docs/declare_target_indirect.md:35
+
+FE generates runtime lookup code to match the function address against the key `host_ptr` and produce the new function address `tgt_ptr` that is then used for the indirect function call.
+
----------------
vzakhari wrote:
> vzakhari wrote:
> > jdoerfert wrote:
> > > vzakhari wrote:
> > > > If needed, we can isolate the lookup implementation into a device RTL API, so that FE just generates a lookup call to map the original function address to the device function address.
> > > API, please: `fp()` -> `(lookupDevPtr(fp))()`
> > Okay, I will add a definition for the lookup API.
> If I just specify the device RTL API that FEs will be able to use, I think I should remove any mentioning of `__openmp_offload_function_ptr_map` symbol. This becomes an implementation detail of the API for a particular device, so different device compiler and device plugins will be able to implement this different ways.
>
> I can describe `__openmp_offload_function_ptr_map` as one of the alternative implementations. Does it sound right?
sounds good to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110193/new/
https://reviews.llvm.org/D110193
More information about the Openmp-commits
mailing list