@@ -4344,6 +4344,10 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice,
4344
4344
DP (" No hostrpc buffer or service thread required\n " );
4345
4345
}
4346
4346
4347
+ // If this kernel requires an RPC server we attach its pointer to the stream.
4348
+ if (GenericDevice.getRPCHandle ())
4349
+ Stream->setRPCHandle (GenericDevice.getRPCHandle ());
4350
+
4347
4351
if (getImplicitArgsSize () == sizeof (utils::AMDGPUImplicitArgsTy)) {
4348
4352
DP (" Setting fields of ImplicitArgs for COV5\n " );
4349
4353
ImplArgs->BlockCountX = NumBlocks;
@@ -4357,18 +4361,6 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice,
4357
4361
(uint64_t )AMDGPUDevice.getPreAllocatedDeviceMemoryPool ();
4358
4362
}
4359
4363
4360
- // If this kernel requires an RPC server we attach its pointer to the stream.
4361
- if (GenericDevice.getRPCHandle ())
4362
- Stream->setRPCHandle (GenericDevice.getRPCHandle ());
4363
-
4364
- if (auto Err = AMDGPUDevice.getStream (AsyncInfoWrapper, Stream))
4365
- return Err;
4366
-
4367
- // If this kernel requires an RPC server we attach its pointer to the stream.
4368
- // Eventually use getRPCServer
4369
- if (GenericDevice.getRPCHandle ())
4370
- Stream->setRPCHandle (GenericDevice.getRPCHandle ());
4371
-
4372
4364
// Push the kernel launch into the stream.
4373
4365
return Stream->pushKernelLaunch (*this , AllArgs, NumThreads, NumBlocks,
4374
4366
GroupSize, StackSize, ArgsMemoryManager);
0 commit comments