<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">You can find attached the patches including the needed modifications both for Clang and libomptarget (based on the repositories of <a href="https://github.com/clang-omp/" class="">https://github.com/clang-omp/</a>). If needed, I can make a push request directly in github.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div>Regards,<br class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">--</div><div class="">Hervé Yviquel</div><div class=""><div class="">Postdoc researcher</div><div class=""><div class="" style="orphans: 2; widows: 2;">Instituto de Computação (IC) - UNICAMP</div><div class="" style="orphans: 2; widows: 2;"><a href="http://people.irisa.fr/Herve.Yviquel/" class="">http://people.irisa.fr/Herve.Yviquel/</a></div><div class="" style="orphans: 2; widows: 2;"><br class=""></div><div class="" style="orphans: 2; widows: 2;"></div></div></div></div></div></body></html>