summaryrefslogtreecommitdiff
path: root/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2024-03-29 12:49:16 -0500
committerGitHub <noreply@github.com>2024-03-29 12:49:16 -0500
commita1a8bb1d3ae9a535526aba9514e87f76e2d040fa (patch)
treeb8ef82216dc13fce92135886bef9f4e0e469e197 /openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
parentbdb60e6f0c8e89abf9bdf36411348db304ca65ba (diff)
[libc] Change RPC interface to not use device ids (#87087)
Summary: The current implementation of RPC tied everything to device IDs and forced us to do init / shutdown to manage some global state. This turned out to be a bad idea in situations where we want to track multiple hetergeneous devices that may report the same device ID in the same process. This patch changes the interface to instead create an opaque handle to the internal device and simply allocates it via `new`. The user will then take this device and store it to interface with the attached device. This interface puts the burden of tracking the device identifier to mapped d evices onto the user, but in return heavily simplifies the implementation.
Diffstat (limited to 'openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp')
-rw-r--r--openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
index a4e6c9319215..55e2865d6aae 100644
--- a/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
@@ -1492,7 +1492,7 @@ Error GenericPluginTy::init() {
GlobalHandler = createGlobalHandler();
assert(GlobalHandler && "Invalid global handler");
- RPCServer = new RPCServerTy(NumDevices);
+ RPCServer = new RPCServerTy();
assert(RPCServer && "Invalid RPC server");
return Plugin::success();