[OpenMP][Libomptarget] Introduce Remote Offloading Plugin
authorAtmn Patel <atmndp@gmail.com>
Sat, 23 Jan 2021 17:23:50 +0000 (12:23 -0500)
committerAtmn Patel <atmndp@gmail.com>
Tue, 26 Jan 2021 20:33:38 +0000 (15:33 -0500)
commitec8f4a38c83eefc51be4f8cc39f93cc79116aab5
treebf8dd03663d535c976abc282003ac502647cb9dc
parent15313f64be9d5ec18582975e0a0548743695f961
[OpenMP][Libomptarget] Introduce Remote Offloading Plugin

This introduces a remote offloading plugin for libomptarget. This
implementation relies on gRPC and protobuf, so this library will only
build if both libraries are available on the system. The corresponding
server is compiled to `openmp-offloading-server`.

This is a large change, but the only way to split this up is into RTL/server
but I fear that could introduce an inconsistency amongst them.

Ideally, tests for this should be added to the current ones that but that is
problematic for at least one reason. Given that libomptarget registers plugin
on a first-come-first-serve basis, if we wanted to offload onto a local x86
through a different process, then we'd have to either re-order the plugin list
in `rtl.cpp` (which is what I did locally for testing) or find a better
solution for runtime plugin registration in libomptarget.

Differential Revision: https://reviews.llvm.org/D95314
17 files changed:
openmp/docs/SupportAndFAQ.rst
openmp/docs/design/Runtimes.rst
openmp/libomptarget/plugins/CMakeLists.txt
openmp/libomptarget/plugins/exports
openmp/libomptarget/plugins/remote/CMakeLists.txt [new file with mode: 0644]
openmp/libomptarget/plugins/remote/include/Utils.h [new file with mode: 0644]
openmp/libomptarget/plugins/remote/include/openmp.proto [new file with mode: 0644]
openmp/libomptarget/plugins/remote/lib/Utils.cpp [new file with mode: 0644]
openmp/libomptarget/plugins/remote/server/CMakeLists.txt [new file with mode: 0644]
openmp/libomptarget/plugins/remote/server/OffloadingServer.cpp [new file with mode: 0644]
openmp/libomptarget/plugins/remote/server/Server.cpp [new file with mode: 0644]
openmp/libomptarget/plugins/remote/server/Server.h [new file with mode: 0644]
openmp/libomptarget/plugins/remote/src/CMakeLists.txt [new file with mode: 0644]
openmp/libomptarget/plugins/remote/src/Client.cpp [new file with mode: 0644]
openmp/libomptarget/plugins/remote/src/Client.h [new file with mode: 0644]
openmp/libomptarget/plugins/remote/src/rtl.cpp [new file with mode: 0644]
openmp/libomptarget/src/CMakeLists.txt