Skip to content

Commit f986706

Browse files
jplehrronlieb
authored andcommitted
[OpenMP] Removes duplicated RPC code
Change-Id: Iaf6987e1bad1cc1382691a29b019f893d3bb3ee2
1 parent 7503f1b commit f986706

File tree

1 file changed

+4
-12
lines changed
  • openmp/libomptarget/plugins-nextgen/amdgpu/src

1 file changed

+4
-12
lines changed

openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4344,6 +4344,10 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice,
43444344
DP("No hostrpc buffer or service thread required\n");
43454345
}
43464346

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+
43474351
if (getImplicitArgsSize() == sizeof(utils::AMDGPUImplicitArgsTy)) {
43484352
DP("Setting fields of ImplicitArgs for COV5\n");
43494353
ImplArgs->BlockCountX = NumBlocks;
@@ -4357,18 +4361,6 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice,
43574361
(uint64_t)AMDGPUDevice.getPreAllocatedDeviceMemoryPool();
43584362
}
43594363

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-
43724364
// Push the kernel launch into the stream.
43734365
return Stream->pushKernelLaunch(*this, AllArgs, NumThreads, NumBlocks,
43744366
GroupSize, StackSize, ArgsMemoryManager);

0 commit comments

Comments
 (0)