Skip to content

[SYCL] Fix kernel range check for interop kernels - #23099

Open
uditagarwal97 wants to merge 4 commits into
syclfrom
private/udit/cmplr-77664
Open

[SYCL] Fix kernel range check for interop kernels#23099
uditagarwal97 wants to merge 4 commits into
syclfrom
private/udit/cmplr-77664

Conversation

@uditagarwal97

@uditagarwal97 uditagarwal97 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Interop kernels and kernels built from a non-SYCL source language (OpenCL C, SPIR-V) carry no SYCL metadata, so there is no id queries range property to read; their id queries are size_t by definition.

isInteropOrSourceBased() is also true for kernel_compiler images built
from SYCL source. Those do have a device image carrying the
idQueriesRange property and do truncate id queries to int by default, so
skipping the check for them turns a clear exception into silently wrong
ids. hasSYCLMetadata() excludes exactly the interop and non-SYCL-source
kernels, which have no property to read.

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.

🟡 Changes recommended

The regression test lacks a required USM capability gate and dispatches billions of work-items synchronously.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates kernel range validation so metadata-free interop and non-SYCL kernels use size_t semantics.

Changes:

  • Distinguishes kernels with SYCL metadata during range validation.
  • Adds an OpenCL interop regression test for ranges above INT_MAX.
File summaries
File Description
sycl/source/detail/scheduler/commands.cpp Handles metadata-free kernels as supporting size_t ranges.
sycl/test-e2e/Regression/interop_kernel_large_range.cpp Tests a large-range OpenCL interop launch.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

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

Comment thread sycl/test-e2e/Regression/interop_kernel_large_range.cpp Outdated
Comment thread sycl/test-e2e/Regression/interop_kernel_large_range.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@uditagarwal97
uditagarwal97 marked this pull request as ready for review September 4, 2026 01:34
@uditagarwal97
uditagarwal97 requested a review from a team as a code owner September 4, 2026 01:34
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.

2 participants