fix(sycl): clean integer_adm_sycl warnings and scope the SYCL tidy lane to changed files - #1281
Merged
Conversation
lusoris
force-pushed
the
fix/sycl-adm-tidy-debt
branch
from
September 4, 2026 17:21
876f0ce to
a249e8b
Compare
This was referenced Sep 4, 2026
… integer_adm_sycl
The tidy cleanup changed `ks = 17 - clz` to `(17 - clz > 0) ? (17 - clz) : 1` at both sites in integer_adm_sycl.cpp. That is a numeric change to an ADM kernel, not a lint fix: the CPU reference carries no such clamp, so the change would move SYCL away from CPU parity for any input where clz > 16, and no justification was recorded. Reverted. If a negative shift is actually reachable here it is a real finding, but it needs a CPU-parity analysis and a cross-backend diff of its own, not a ride-along in a warning cleanup. Tracked in docs/state.md as an open row. Also renders the changelog fragment the cleanup added. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… question Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lusoris
marked this pull request as ready for review
September 4, 2026 21:01
lusoris
force-pushed
the
fix/sycl-adm-tidy-debt
branch
from
September 4, 2026 21:01
a249e8b to
617a24c
Compare
…R-0165 touch gate)
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clang-Tidy SYCL (Changed Files, Advisory)reddened #1223 — a PR whose only SYCL file isfloat_vif_sycl.cpp— with warnings fromcore/src/feature/sycl/integer_adm_sycl.cpp, a file it never touched. Two separate problems, two separate commits.(A) Real defects in
integer_adm_sycl.cppconstspecifier (const int32_t const const *p). Rewritten asconst int32_t *const p; the pointee stays const, and since the arrays are never reassigned after init the pointer can be too — which is also why themisc-const-correctnessNOLINT that claimed the variable "is mutated" could go.Fixed in code. No NOLINT added.
(B) The lane's scoping bug — why an untouched file failed an unrelated PR
The job ran
meson compile -C build-sycl(the whole tree, under icpx) before clang-tidy, so any translation unit's compiler warning failed the job regardless of the PR's diff. The lane's name promised "changed files"; the build step didn't. It now builds onlyinclude/vcs_version.h— the one generated header clang-tidy needs — andscripts/ci/clang-tidy-sycl.shpins-std=c++20for stock clang-tidy and drops the-D__SYCL_DEVICE_ONLY__=0guard.What was taken back out — and why
The agent that made the cleanup also changed
ks = 17 - clzto(17 - clz > 0) ? (17 - clz) : 1at two sites. That is a numeric change to an ADM kernel, not a lint fix: the CPU reference has no such clamp, so it would move SYCL off CPU parity for any input withclz > 16, and no justification was recorded. Reverted in the third commit. Whether a negative shift is actually reachable there is a fair question — it is now an open row indocs/state.md(T-SYCL-ADM-NEGATIVE-SHIFT-REACHABILITY-2026-09-04) that needs a CPU-parity analysis and a cross-backend diff of its own.Type
fix— bug fixbuild/ci— tooling / infrasycl— backend-specificChecklist
make format && make lintis green locally.-Denable_sycl=true) completes withSYCL_BUILD_RC=0; the CPU fast suite is unaffected (no CPU file changed)./cross-backend-diffand the worst ULP is ≤ 2. — The only numeric change in the branch's history (the clamp) was reverted; the surviving edits are declaration-order and const-qualifier changes that cannot alter codegen semantics. No ULP delta is possible from what ships..c/.cpp/.cu/.h/.hpp, it has the license header. — n/a.!. — n/a.docs/adr/_index_fragments/. — n/a; no design decision.integer_adm_sycl.cppplus CI-lane scoping; no user-visible behaviour, flag, or output changes, so nodocs/backends/sycl/page is affected.Bug-status hygiene (ADR-0165)
docs/state.mdupdated — one row closed, one row opened.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Cross-backend numerical results
None expected and none possible from the shipped diff: initialiser order and const-ness do not change generated code. The one change that would have moved numbers was reverted before this PR was opened.
Deep-dive deliverables (ADR-0108)
icpxprinted; the scoping bug is one line of workflow YAML.AGENTS.mdinvariant note — no rebase-sensitive invariants: every touched path is fork-added with no upstream counterpart. The don't-clamp and don't-full-compile invariants are indocs/rebase-notes.md.changelog.d/fixed/sycl-adm-tidy-scoping.md.docs/rebase-notes.md.Reproducer
Verification performed
Same object, same icpx, same flags — only the source file swapped:
integer_adm_sycl.cppversionconstwarningsorigin/masterThe one remaining warning is
icpx: warning: argument unused during compilation: '-Xs -device …'— the build system's device list, reported on every SYCL TU regardless of source, and visible in CI's own logs before this change. Out of scope here.ninja -C core/build-sycl)SYCL_BUILD_RC=0, 210/210 targetsgit checkout -- integer_adm_sycl.cppafter the controlpre-commiton every touched fileconcat-changelog-fragments.sh --checkKnown follow-ups
T-SYCL-ADM-NEGATIVE-SHIFT-REACHABILITY-2026-09-04(open): isclz > 17reachable atinteger_adm_sycl.cpp:705,1032, and what does the CPU integer ADM do there? Needs parity analysis before any change.-D__SYCL_DEVICE_ONLY__=0removal in the wrapper is verified only by this PR's own advisory-lane run; if that lane shows stock clang-tidy choking on device-only intrinsics, the guard should come back.🤖 Generated with Claude Code