Skip to content

[SYCL][Doc] Add std::span kernel arguments to nd_launch - #23479

Merged
uditagarwal97 merged 4 commits into
intel:syclfrom
mieshkiwrk:mdziado/kernel-args-span-spec
Oct 20, 2026
Merged

uditagarwal97 merged 4 commits into
intel:syclfrom
mieshkiwrk:mdziado/kernel-args-span-spec

Conversation

@mieshkiwrk

@mieshkiwrk mieshkiwrk commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Spec part of #22971, split out so it can be reviewed on its own:

  • sycl_ext_oneapi_enqueue_functions version 2: nd_launch overloads taking a sycl::nd_range and the arguments of a sycl::kernel as a std::span<const raw_kernel_arg> (C++20).
  • sycl_ext_oneapi_raw_kernel_arg version 2: a pointer_arg constructor, since the byte form cannot pass a pointer portably.

The other launch functions get the same overloads in #23481.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The specification is coherent, with only a non-blocking endnote formatting issue.

1 open finding
What changed in this PR

Documents C++20 span-based nd_launch arguments and portable raw pointer arguments.

Changes:

  • Adds raw_kernel_arg pointer support and version 2.
  • Adds span-based nd_launch overloads, constraints, and an example.
File Description
sycl_ext_oneapi_raw_kernel_arg.asciidoc Specifies pointer arguments and OpenCL support.
sycl_ext_oneapi_enqueue_functions.asciidoc Specifies span overloads and usage.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc Outdated
@gmlueck

gmlueck commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

See my review comments in #23481

This reverts commit f9f7374.

A kernel defined as a named function object cannot be launched through a kernel object, so the example needs the free function kernel.
@sys-ce-bb

Copy link
Copy Markdown
Contributor

@intel/llvm-gatekeepers please consider merging

@uditagarwal97
uditagarwal97 merged commit 71b68a1 into intel:sycl Oct 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants