[llvm] [Offload] Do not do not re-initialize RPC server (PR #218757)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 06:16:31 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();
----------------
jhuber6 wrote:
Thanks, your comment made me think about this more than two seconds and I remembered that this function does both alloc + initialization and the only part we need to skip is the allocation part. Fixed.
https://github.com/llvm/llvm-project/pull/218757
More information about the llvm-commits
mailing list