[Openmp-commits] [PATCH] D68100: [OpenMP 5.0] declare mapper runtime implementation

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Sep 27 13:16:15 PDT 2019


ABataev added a comment.

In D68100#1686451 <https://reviews.llvm.org/D68100#1686451>, @lildmh wrote:

> In D68100#1686437 <https://reviews.llvm.org/D68100#1686437>, @ABataev wrote:
>
> > In D68100#1686432 <https://reviews.llvm.org/D68100#1686432>, @lildmh wrote:
> >
> > > Sorry, you are right. I didn't think about the case to always clean up the mappers after finishing using it.
> > >
> > > Another possible problem: what if a task is scheduled out after `__tgt_mapper` and before `__tgt_target`, for example. I don't think we can keep a per task/thread mapper storage in the current implementation.
> >
> >
> > tgt_mapper must be called immediately before tgt_target in the same task context.
>
>
> Yes, but I think it cannot solve this problem. For example, after a task executes `__tgt_mapper`, it is scheduled out and a new task is scheduled to execute. After the previous task resumes execution, the mapper information it stored has lost, and the execution of the `__tgt_target` will not get the mapper. I don't think there is a per-task context in libomptarget.


libomptarget already uses some functions from libomp, you can use it to check for the task context.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68100/new/

https://reviews.llvm.org/D68100





More information about the Openmp-commits mailing list