[clang] [llvm] [Offload] Unify the kernel argument passing (PR #205224)

Piotr Balcer via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 05:49:04 PDT 2026


================
@@ -197,42 +197,10 @@ Error L0KernelTy::launchImpl(GenericDeviceTy &GenericDevice,
 
   // With pointer-array arguments, zeCommandListAppendLaunchKernelWithArguments
   // folds group-size, per-argument set, and launch into a single call.
-  const bool IsPtrArgs = KernelArgs.Flags.IsPtrArgs;
-  if (IsPtrArgs) {
-    if (KernelArgs.NumArgs != KernelPR.NumKernelArgs)
-      return Plugin::error(
-          ErrorCode::INVALID_ARGUMENT,
-          "Number of arguments (%u) does not match the number of arguments "
-          "expected by the kernel (%u)",
-          KernelArgs.NumArgs, KernelPR.NumKernelArgs);
-  } else {
+  if (!LaunchParams.Args)
     CALL_ZE_RET_ERROR(zeKernelSetGroupSize, zeKernel, GroupSizes.groupSizeX,
                       GroupSizes.groupSizeY, GroupSizes.groupSizeZ);
----------------
pbalcer wrote:

This should be removed, since it was only used for the old path.

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


More information about the cfe-commits mailing list