[Openmp-commits] [PATCH] D50158: [OpenMP] Add placeholder functions for the depend and nowait depend clauses for target data directives.
Jonas Hahnfeld via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Aug 2 09:52:13 PDT 2018
Hahnfeld added a comment.
In https://reviews.llvm.org/D50158#1185936, @ABataev wrote:
> In https://reviews.llvm.org/D50158#1185919, @Hahnfeld wrote:
>
> > In https://reviews.llvm.org/D50158#1185906, @RaviNarayanaswamy wrote:
> >
> > > We should not be having calls to _-kmpc_omp_taskwait in libomptarget.
> > > The wait should be done in the user code and then libomptarget routine should be called.
> >
> >
> > There is no way to implement asynchronous offloading without having knowledge of the dependencies. Intel failed to keep the separation strict for liboffload, so I don't think it helps to complain about the situation.
>
>
> Instead, we may pass the pointer to the synchronization function and call it. The compiler may provide the pointer to this sync function. The expected function may be simple (like void sync()), the compiler may generate the required wrapper function around `__kmpc_omp_taskwait`
When truly implementing asynchronous offloading libomptarget needs to tightly integrate into libomp's task scheduling. This will require a larger set of functions and I don't think we should change the interface just because we want to improve the implementation.
Anyway it's libOMPtarget, I don't really see the point. The library isn't agnostic of the programming model, it obeys to `OMP_` environment variables - which btw. are also queried from libomp!
Repository:
rOMP OpenMP
https://reviews.llvm.org/D50158
More information about the Openmp-commits
mailing list