Skip to content

Commit 6be750b

Browse files
committed
On AMD, don't release kernel args if they haven't been allocated
1 parent 9542f35 commit 6be750b

File tree

1 file changed

+5
-3
lines changed
  • offload/plugins-nextgen/amdgpu/src

1 file changed

+5
-3
lines changed

offload/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,9 +1261,11 @@ struct AMDGPUStreamTy {
12611261
// Consume stream slot and compute dependencies.
12621262
auto [Curr, InputSignal] = consume(OutputSignal);
12631263

1264-
// Setup the post action to release the kernel args buffer.
1265-
if (auto Err = Slots[Curr].schedReleaseBuffer(KernelArgs, MemoryManager))
1266-
return Err;
1264+
// Setup the post action to release the kernel args buffer, if it exists
1265+
if (KernelArgs) {
1266+
if (auto Err = Slots[Curr].schedReleaseBuffer(KernelArgs, MemoryManager))
1267+
return Err;
1268+
}
12671269

12681270
// If we are running an RPC server we want to wake up the server thread
12691271
// whenever there is a kernel running and let it sleep otherwise.

0 commit comments

Comments
 (0)