fix(sycl): mirror the integer-ADM contrast-masking near edge, and extend large-fixture parity to SYCL - #1369
Draft
lusoris wants to merge 4 commits into
Draft
fix(sycl): mirror the integer-ADM contrast-masking near edge, and extend large-fixture parity to SYCL#1369lusoris wants to merge 4 commits into
lusoris wants to merge 4 commits into
Conversation
lusoris
pushed a commit
that referenced
this pull request
Sep 6, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
19 tasks
lusoris
force-pushed
the
test/gpu-parity-large-fixture-other-backends
branch
from
September 7, 2026 06:54
6238919 to
635ae84
Compare
lusoris
pushed a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lusoris
pushed a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lusoris
force-pushed
the
test/gpu-parity-large-fixture-other-backends
branch
from
September 7, 2026 09:14
635ae84 to
6f02fb5
Compare
lusoris
pushed a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lusoris
force-pushed
the
test/gpu-parity-large-fixture-other-backends
branch
from
September 7, 2026 09:16
6f02fb5 to
b43a7eb
Compare
lusoris
pushed a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lusoris
force-pushed
the
test/gpu-parity-large-fixture-other-backends
branch
from
September 7, 2026 10:18
b43a7eb to
a10a774
Compare
lusoris
pushed a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lusoris
force-pushed
the
test/gpu-parity-large-fixture-other-backends
branch
from
September 7, 2026 12:16
a10a774 to
24666c2
Compare
lusoris
pushed a commit
that referenced
this pull request
Sep 7, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lusoris
force-pushed
the
test/gpu-parity-large-fixture-other-backends
branch
from
September 7, 2026 13:16
24666c2 to
90f86d5
Compare
…e (ADR-1206) Extends the ADR-1206 large-fixture variants from CUDA to SYCL. Every SYCL parity test pinned one small fixture, so the shared SSIM/MS-SSIM auto-scale `max(1, round(min(w, h) / 256))` never left 1 and the ADM border crop never left 0 — the region where ADR-1202, ADR-1204 and the float_ssim scale=1-only limitation all hid. Verified on an Arc A380: 16 large variants pass, 3 skip. The sweep found two things. `float_ssim_sycl` is a documented v1 scale=1-only extractor, so its large variant now records that contract as a skip (and still fails loudly if the twin ever stops refusing and starts returning a scale=1 score at a decimating resolution). `test_sycl_motion_add_uv_parity` is not registered: it compares the CPU float `float_motion` against the fixed-point `motion_sycl`, so its 2e-4 tolerance is a quantisation budget calibrated for one fixture rather than a bit-exactness bound, and at 960x540 it lands at 2.30e-04 — over a bound never derived for that resolution. Tracked as T-SYCL-MOTION-ADD-UV-TOLERANCE-RESOLUTION-2026-09-06 rather than papered over by raising the tolerance. HIP and Metal are deliberately not registered: Metal cannot be verified on this workstation at all, and shipping test registrations that have never been run is how a lane goes red for reasons nobody has looked at. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
test_sycl_adm_parity was failing on the Arc A380 on its shipped fixture: integer_adm_scale3_csf_2 cpu=0.58175555 sycl=0.58191226, delta 1.57e-04 against the places=4 gate. Green in CI only because the test skips cleanly with no SYCL device, which is every hosted runner. The CPU contrast-masking rule is asymmetric — the near edge mirrors to index 1, the far edge clamps to the last index (integer_adm.c:1009-1012). The SYCL twin clamped both, so row/column 0 was read twice and the mirrored sample dropped. It only diverges once a scale's border crop (int)(dim * 0.1 - 0.5) collapses to 0 — band dimensions <= 14 — and scale 3 of the 256x144 fixture is a 16x9 band, exactly that regime. CUDA, HIP and Metal all already carry this fix (ADR-1167 / PR #1224). SYCL was the only twin that never received it. Verified on an Arc A380: test_sycl_adm_parity 6/6, shipped SYCL parity suite 17 pass/1 fail -> 18 pass/0 fail, large-fixture suite 16 pass/0 fail. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lusoris
force-pushed
the
test/gpu-parity-large-fixture-other-backends
branch
from
September 7, 2026 16:38
90f86d5 to
38eaa65
Compare
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
Follows #1363 (now merged). Rebased onto
master; supersedes the auto-closed #1366.Extends the ADR-1206 large-fixture parity variants from CUDA to SYCL, and fixes the real bug that immediately found.
ADR-1210 —
test_sycl_adm_paritywas failing on the Arc A380, on its shipped fixture:The CPU contrast-masking rule is asymmetric — near edge mirrors to index 1, far edge clamps to the last index (
integer_adm.c:1009-1012). The SYCL twin clamped both, reading row/column 0 twice and dropping the mirrored sample. It only diverges once a scale's ADM border crop(int)(dim * 0.1 - 0.5)collapses to 0 — band dimensions ≤ 14 — and scale 3 of the 256x144 fixture is a 16x9 band, exactly that regime.CUDA (
adm_cm.cu), HIP (adm_cm.hip) and Metal (iadm_clampx) all already carry this fix from ADR-1167 / PR #1224. SYCL was the only twin that never received it. Green in CI only because the test skips with no SYCL device — every hosted runner.Two variants are handled explicitly rather than silently:
float_ssim_syclis a documented v1 scale=1-only extractor; its large variant records that contract as a skip, and still fails loudly if the twin ever stops refusing and starts returning a scale=1 score at a decimating resolution.test_sycl_motion_add_uv_parityis not registered. It compares CPU floatfloat_motionagainst fixed-pointmotion_sycl, so its 2e-4 tolerance is a quantisation budget calibrated for one fixture, not a bit-exactness bound; at 960x540 it lands at 2.30e-04. Raising the tolerance to make it pass would be exactly the test-weakening the fork forbids, so it is tracked asT-SYCL-MOTION-ADD-UV-TOLERANCE-RESOLUTION-2026-09-06instead.HIP and Metal large variants are deliberately not registered: Metal cannot be verified on this workstation at all, and shipping test registrations that have never been run is how a lane goes red for reasons nobody has looked at.
Type
fix— bug fixtest— test-onlysycl/cuda/simd— backend-specificChecklist
make format && make lintis green locally (pre-commit run --filesclean).meson test -C build— SYCL suites on an Arc A380: 18/0/2 shipped, 16/0/3 large./cross-backend-diffand the worst ULP is ≤ 2 — equivalent done directly: the CPU-vs-SYCLinteger_adm_scale3_csf_2delta goes from 1.57e-04 to inside the 1e-4 gate, and every other SYCL parity feature passes at both fixtures..c/.h— no new source files.integer_admscores move at coarse-band sizes ≤ 14 px, towards the CPU reference; no fork-added snapshot covers that.docs/adr/_index_fragments/— index in sync.Bug-status hygiene (ADR-0165)
docs/state.mdupdated —T-SYCL-INTEGER-ADM-CM-NEAR-EDGE-2026-09-06closed,T-SYCL-MOTION-ADD-UV-TOLERANCE-RESOLUTION-2026-09-06opened.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Deep-dive deliverables (ADR-0108)
docs/research/2032-gpu-parity-resolution-blind-spot.md(added by fix(gpu): clamp the ADM contrast-masking far edge and finish the ssimulacra2 FMA unification #1363) and this is a direct application of it; ADR-1210 carries the specific evidence.## Alternatives consideredin ADR-1210 (including why loosening the 1e-4 tolerance was rejected) and the extended ADR-1206.AGENTS.mdinvariant note — added tocore/test/AGENTS.md.changelog.d/fixed/sycl-integer-adm-cm-near-edge.mdandchangelog.d/fixed/sycl-parity-large-fixture-variants.md.docs/rebase-notes.md, "ADR-1206 (SYCL) — which parity tests get a large-fixture variant".Reproducer
Needs a host with an Intel GPU — without one the tests skip and report green, which is how this survived.
CC=icx CXX=icpx meson setup build core -Denable_sycl=true -Denable_cuda=false ninja -C build meson test -C build --suite syclOn the parent commit
test_sycl_adm_parityfails withdelta=1.57e-04 tol=1.00e-04; on this branch the suite is 18/0.Known follow-ups
T-SYCL-MOTION-ADD-UV-TOLERANCE-RESOLUTION-2026-09-06— needs a derived, resolution-aware fixed-point-vs-float bound, not a bumped constant.SYCL Parity (Arc A380)lane builds--buildtype=release; this was found in a debug build. The two configurations should be reconciled so the lane sees what a developer sees.🤖 Generated with Claude Code