[Openmp-commits] [PATCH] D60972: [OpenMP 5.0] libomptarget interface for declare mapper functions
Jonas Hahnfeld via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jun 4 23:33:58 PDT 2019
Hahnfeld added a comment.
In D60972#1529265 <https://reviews.llvm.org/D60972#1529265>, @lildmh wrote:
> In D60972#1529238 <https://reviews.llvm.org/D60972#1529238>, @Hahnfeld wrote:
>
> > In D60972#1529215 <https://reviews.llvm.org/D60972#1529215>, @lildmh wrote:
> >
> > > The compiler doesn't generate code related to `std::vector`. It's only used in the runtime implementation, so it should be okay with Fortran. Again, the IBM and Intel compiler people seem to agree with it.
> >
> >
> > Maybe I don't understand where `rt_mapper_handle` comes from. According to the design slides and D59474 <https://reviews.llvm.org/D59474>, it passed as an argument to the generated `omp_mapper[...]` function, but how is the runtime system involved in its creation? Will there be additional interface functions / changes that will call this?
>
>
> The idea is the runtime will create a `MapperComponentsTy` (`std::vector`) before calling the mapper function, in, for instance, `__tgt_target_data_begin` (These parts will be implemented in later patches). When the mapper function is called, the pointer of `MapperComponentsTy` is passed to it, as `void *rt_mapper_handle`. The mapper function will call `__kmpc_push_mapper_component` using this `rt_mapper_handle`, and then the runtime can put it into the `MapperComponentsTy`
That's hard to guess from the current patch and isn't in the design slides either (or I have overlooked it). Such information should be made available to reviewers such that they can assess the implementation!
If the new functions `mapper_num_components` and `push_mapper_component` are only used by a "callback" that is called from the runtime, why do we need to export them? We could pass the function pointers next to `rt_mapper_handle` and be done with it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60972/new/
https://reviews.llvm.org/D60972
More information about the Openmp-commits
mailing list