[Openmp-dev] Where are the ICV and runtime functions defined?
Daniel Schürmann via Openmp-dev
openmp-dev at lists.llvm.org
Wed Jul 19 01:55:21 PDT 2017
Thank you! That is exactly what I was looking for.
The plugin rtl is already done, but I was missing the device runtime.
So far, I implemented stuff like for_static_init() directly in clang. Is
In a later step, I wanted to get rid of the ub, lb, etc. references
which is not possible if this has to implemented as runtime functions
instead of codegen. Any advice?
I am using OpenCL 2.1 and generate SPIR-V kernels. Thus, I would like to
have the device runtime functions as SPIR-V functions (compiled offline
from OpenCL). How do I handle this to be upstreamable?
On 07/19/2017 10:09 AM, Hahnfeld, Jonas wrote:
> I assume you are talking about using OpenCL to implement the target constructs aka offloading?
> There are two things:
> 1) You need a plugin for libomptarget that handles the mapping from the target agnostic runtime entry points to the OpenCL runtime. There are already some committed to SVN (generic ELF one for x86 and ppc and one for CUDA)
> 2) You need an OpenMP runtime that can be linked to implement device side functions. For x86, the same runtime is used as on the host (libomp). The NVPTX implementation is currently under review: https://reviews.llvm.org/D14254
> Does that answer your questions?
> -----Original Message-----
> From: Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] On Behalf Of Daniel Schürmann via Openmp-dev
> Sent: Tuesday, July 18, 2017 5:25 PM
> To: via Openmp-dev <openmp-dev at lists.llvm.org>
> Subject: [Openmp-dev] Where are the ICV and runtime functions defined?
> Hello together,
> now, that I'm making progress with my OpenCL/SPIR-V implementation (I got a running subset with proper parallelisation), I seem to get blind on both eyes when it comes to finding things.
> I would be very thankful, if someone could tell me, where to implement the ICVs and runtime functions (I mean the ones defined in the specification). Or are they implemented once and not per target platform?
> Also, I'm not sure, if the runtime functions should be callable from target region, but it seems so. This would mean that I have to write some SPIR-V functions for each declared function in omp.h. Where do I put these?
> Thanks in advance,
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
More information about the Openmp-dev