[llvm] [offload] Add olLaunchKernelWithPtrArgs with an argument pointer array (PR #194333)

Piotr Balcer via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 03:54:48 PDT 2026


pbalcer wrote:

> Thanks for preparing this detailed proposal. I don't see any strong reason to oppose this change. Given that all plugins can implement the pointers-based kernel launch, I'd be in favor of replacing the current buffer-based mechanism with this new (actually, the old) approach.

Thanks!

> Exposing two distinct kernel launch routines in the liboffload API seems unnecessary and introduces portability issues.

Agreed.

> In addition, switching to the pointers-based approach should allow us to remove the workaround for subtracting the tail padding from the args size in the CUDA plugin (#172249). Long story short, the CUDA driver doesn't like tail padding in the total args size and returns an error. To fix that in the plugin, I introduced a call to `cuFuncGetParamInfo` so we could subtract the tail padding of the last argument, without realizing this requires a minimum CUDA version of 12.4 (which is too recent).

While working on the proposal I was under the impression that there's a substantial room for simplification around kernel dispatch in the Plugin Interface and OpenMP, if transitioned to pointer-to-args approach. I can make a follow up change if there's consensus that we should do that.

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


More information about the llvm-commits mailing list