[llvm] [Offload] Do not do not re-initialize RPC server (PR #218757)

Kevin Sala Penades via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 22:03:24 PDT 2026


================
@@ -207,6 +207,10 @@ RPCServerTy::isDeviceUsingRPC(plugin::GenericDeviceTy &Device,
 Error RPCServerTy::initDevice(plugin::GenericDeviceTy &Device,
                               plugin::GenericGlobalHandlerTy &Handler,
                               plugin::DeviceImageTy &Image) {
+  std::lock_guard<decltype(BufferMutex)> Lock(BufferMutex);
+  if (Buffers[Device.getDeviceId()])
+    return Error::success();
----------------
kevinsala wrote:

Not very familiar with RPC code. What's expected to happen with any second or subsequent call to this `initDevice` (with another image?), are they ignored?

https://github.com/llvm/llvm-project/pull/218757


More information about the llvm-commits mailing list