[llvm] [Offload] Allow setting null arguments in olLaunchKernel and fix amdgpu handling for empty kernel arguments (PR #141958)

Ross Brunton via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 2 04:40:56 PDT 2025


================
@@ -1260,9 +1261,11 @@ struct AMDGPUStreamTy {
     // Consume stream slot and compute dependencies.
     auto [Curr, InputSignal] = consume(OutputSignal);
 
-    // Setup the post action to release the kernel args buffer.
-    if (auto Err = Slots[Curr].schedReleaseBuffer(KernelArgs, MemoryManager))
-      return Err;
+    // Setup the post action to release the kernel args buffer, if it exists
+    if (KernelArgs) {
----------------
RossBrunton wrote:

The releaseBufferAction has an assert:

```c++
assert(Args->Buffer && "Invalid buffer");
```

I could just remove the assert, but since the action is just a no-op, I figured it'd be better to just skip pushing it to the queue entirely.

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


More information about the llvm-commits mailing list