OpenMP 4.x Accelerator Offloading with OpenCL/SPIR

Hello together,

I'm a computer science master student at TU Berlin and would like to implement an OpenCL/SPIR back-end for OpenMP Accelerator Offloading for my master thesis.

The motivation is to enable all OpenCL devices with support for the SPIR extension to be targeted by OpenMP accelerator offloading. Besides the simplicity of programming GPUs by annotating scalar C/C++ implementations, this approach would additionally make it easier for other programming languages or libraries to provide single-source GPGPU programming capabilities. One example is triSYCL, an open source implementation of the SYCL specification, whose goal is to provide a single-source programming model for OpenCL devices. The current implementation is based on OpenMP with execution on the CPU, while future development wants to make use of OpenMP accelerator offloading.

As far as I understand the following steps have to be taken:
Clang/LLVM is already compatible with the libomptarget RTL. For the OpenCL back-end, minor adjustments are necessary to emit SPIR code for OpenCL devices. I would appreciate if someone could pinpoint me the particular code section in Clang.
As libomptarget is device-independent, it only has to made aware of the new OpenCL target RTL.
For the target RTL, the specified interface has to be implemented.

I would be thankful for all kinds of corrections and support I can get.
Please tell me, if anyone is already working on this topic.

Thanks in advance,
Daniel