[Openmp-commits] [PATCH] D23587: [OPENMP] Implementation of omp_get_default_device and omp_set_default_device

Andrey Churbanov via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 17 08:22:45 PDT 2016


AndreyChurbanov added a comment.

In https://reviews.llvm.org/D23587#517940, @Hahnfeld wrote:

> In general: Do we really need this in `libomp`?


Not necessarily, but this looks like an appropriate solution - to move the functions from offload library to libomp.

> We currently have the problem of two runtime libraries and will probably continue with it: `libomp` supporting the host and `liboffload` / `libomptarget` supporting all target related things.

> 

> I imagine in the current state this will give linker errors with `liboffload` / `libomptarget` that define their own version of this function.


It is unlikely because the functions supposed to be removed from offload library simultaneously, at list this is an intention.

An alternative would be to implement internal versions of the functions in libomp leaving public symbols in offload library and changing their implementation to call to libomp, but this also does not look very elegant solution.

The initial problem might be clearer specified in the summary, as it is not an implementation of missing functions, it is the (part of) movement of incorrectly implemented functions to place where they can easier be implemented correctly. The offload library does not mange OMP tasks and thus it can hardly implement per-task control in a correct way without help of libomp.


Repository:
  rL LLVM

https://reviews.llvm.org/D23587





More information about the Openmp-commits mailing list