[clang] [llvm] [clang][CUDA] Avoid accounting for tail padding in LLVM offloading (PR #156229)

Kevin Sala Penades via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 10:40:57 PDT 2025


================
@@ -3655,11 +3655,6 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice,
                                  KernelArgsTy &KernelArgs,
                                  KernelLaunchParamsTy LaunchParams,
                                  AsyncInfoWrapperTy &AsyncInfoWrapper) const {
-  if (ArgsSize != LaunchParams.Size &&
----------------
kevinsala wrote:

The first condition will be true if there are implicit kernel arguments. The second condition can't be checked anymore because the `LanuchParams.Size` does not account for the tail padding of user arguments. Thus, `ArgsSize` can actually be larger than `LaunchParams.Size + getImplicitArgsSize()` because the padding between these last two is not accounted.

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


More information about the llvm-commits mailing list