[Openmp-dev] Offloading API

Hervé Yviquel via Openmp-dev openmp-dev at lists.llvm.org
Fri Oct 9 08:44:40 PDT 2015


Hi all,

Some of my colleagues and I are currently developing the infrastructure for adding a new device, the cloud, to the list of available targets. Considering the cloud as a device requires few changes to the API of the offloading library (libomptarget). Indeed, our cloud device handles offloading data thanks to files instead of values within an address space. To do so, we had to associate each offloaded variables with a unique identifier. Those identifiers are assigned by Clang to each variable, then transmitted to libomptarget as an additional argument of the offloading function "__tgt_target". In case of pointer addresses that are not generated by Clang, the special identifier "-1" is attributed. This allows us to easily skip the offloading of these addresses that our device doesn't use.

You can find attached the patches including the needed modifications both for Clang and libomptarget (based on the repositories of https://github.com/clang-omp/ <https://github.com/clang-omp/>). If needed, I can make a push request directly in github.

Let's us precise that we plan to open source all this work and to submit patches to the upstream Clang/OpenMP repositories when it will be mature enough. Additionally to simplify future integrations, those API changes can be helpful for any exotic offloading target. That's why we propose to integrate them directly.

Regards,
--
Hervé Yviquel
Postdoc researcher
Instituto de Computação (IC) - UNICAMP
http://people.irisa.fr/Herve.Yviquel/ <http://people.irisa.fr/Herve.Yviquel/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20151009/dd69fcdb/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libomptarget-identifiers.patch
Type: application/octet-stream
Size: 20644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20151009/dd69fcdb/attachment-0002.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20151009/dd69fcdb/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-identifiers.patch
Type: application/octet-stream
Size: 12182 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20151009/dd69fcdb/attachment-0003.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20151009/dd69fcdb/attachment-0005.html>


More information about the Openmp-dev mailing list