[llvm] [offload] use argument pointer array in olLaunchKernel (PR #194333)
Piotr Balcer via llvm-commits
llvm-commits at lists.llvm.org
Thu May 28 05:47:37 PDT 2026
================
@@ -4191,20 +4191,41 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice,
if (auto Err = GenericDevice.getDeviceStackSize(StackSize))
return Err;
- // Copy the explicit arguments.
- // TODO: We should expose the args memory manager alloc to the common part as
- // alternative to copying them twice.
- if (LaunchParams.Size)
- std::memcpy(AllArgs, LaunchParams.Data, LaunchParams.Size);
+ // Copy explicit arguments.
+ size_t ExplicitEnd = 0;
+ if (KernelArgs.Flags.IsPtrArgs) {
+ if (KernelArgs.ArgPtrs) { // may be null
+ const auto &ArgMDs = KernelInfo->ExplicitArgMDs;
----------------
pbalcer wrote:
Done. `KernelInfo` is no longer an optional, and we return an error if it's not found.
https://github.com/llvm/llvm-project/pull/194333
More information about the llvm-commits
mailing list