Repository navigation
feat(sycl): evaluate two ADM viewing distances in one adm_sycl instance - #2657
Merged
Merged
Conversation
This was referenced Oct 9, 2026
lusoris
force-pushed
the
port/upstream-cffd5b77-sycl
branch
from
October 9, 2026 08:57
252c00e to
a70a5b8
Compare
* fix(deps): move to golusoris v0.13.1 and core v0.10.1 Moves the Go module from golusoris v0.12.0 and core v0.9.2 to v0.13.1 and v0.10.1, and applies the breaking changes of golusoris#633 that reach VMAFx call sites: - jobs.Register returns an error. backend.RegisterLeaseSweep returns it and the controller stops the River start on it, where River used to panic on a duplicate registration. sweep_test.go covers fresh, nil and uninitialised registries, a nil sweeper and a second registration. - testutil/pg refuses a test image without a digest. storetest.Image and OldestImage are pinned to the index digests of postgres:18.6-alpine and postgres:16.15-alpine; without the pin every Postgres-backed controller test fails at start. - httpx/server treats http.limits.body=0 as the 10 MiB default and adds http.limits.unlimited. The platform definition documents both keys, the env tables are regenerated, and hardening_test.go pins both behaviours on the production graph. No other item of the golusoris v0.13.0 migration guide reaches a package VMAFx imports. v0.13.1 over v0.13.0 is bug fixes in packages VMAFx does not import. Signed-off-by: Lusoris <lusoris@proton.me>
…ce (#2657) * feat(sycl): evaluate two ADM viewing distances in one adm_sycl instance adm_sycl takes adm_norm_view_dist_extra and the shared merge callback and name hook (adm_view_dist.c). Each scale's DWT runs once per frame; the decouple + CSF pass and the denominator / contrast-masking reductions run once per distance, with that distance's fixed-point CSF weights and into its own block of the accumulator buffer, which the one memset and the one readback of the frame cover. The host concludes each distance with its own weights and normalisation shifts and files the second under the <base>:nvde keys, without debug scores. Both distances return the CPU's bits (ADR-2795; test_adm_two_views_exact at 8 and 10 bits and under the model options, test_adm_merged_registrations_exact). Signed-off-by: Lusoris <lusoris@proton.me>
lusoris
force-pushed
the
port/upstream-cffd5b77-sycl
branch
from
October 9, 2026 09:53
a70a5b8 to
61da259
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
The SYCL twin of integer ADM evaluates two viewing distances in one instance, the third step of the Q-298 stack (ADR-2795). This covers
adm_norm_view_dist_extraand two models such asvmaf_v1.0.16_3d0hand_5d0hon--backend sycl. The wavelet transform runs once per scale. The decouple + CSF pass and the denominator / contrast-masking reductions run once per distance. Both distances return the CPU's scores bit for bit on the Arc A380.adm_sycluses the shared merge callback and name hook ofadm_view_dist.c(#2647), so there is still one implementation of the merge and naming rules (HISS-19).Builds on #2646 (C + Rust) and #2647 (CUDA), both landed; this branch is one commit on master.
Maintainer decision Q-298 (2026-10-08): "D4 nvde, cffd5b77d + 33e5f0aca: full scope — C + Rust mirror (ADR-1713) AND bit-identical on CUDA, SYCL, HIP and Metal now (no DEFAULT_ONLY). Stack it as needed (C+Rust first, then one PR per backend is fine), each with == parity tests and exact_twins entries; device runs under the locks; Metal evidence is outside hardware — mark pending with the tester path if no Mac is available."
What changed
core/src/feature/sycl/integer_adm_sycl.cpp:adm_norm_view_dist_extra(nvde), the same table entry as the CPU's.rfactor,i_rfactorandcsf_normalization_shiftare indexed by distance;adm_init_view_rfactors()fills each, afteradm_csf_config_check()has checked every distance ininit.enqueue_adm_dwt()once, thenenqueue_adm_reductions()once per distance, with that distance's fixed-point weights and into its ownADM_ACCUM_SLOTSblock ofd_accum. The queue is in order, and a distance's kernels write onlycsf_f,csf_f_aimand their own block.ADM_ACCUM_BYTES * adm_sycl_views().adm_scale_cpu(),adm_terms()and the newcollect_view()take the distance. The second distance is filed under<base>:nvde, without debug scores.adm_init_names()builds the name dictionary and extends it through the shared hook..mergeand.extend_name_dictto the shared helpers.test_sycl_adm_parity.c:run_adm_keys()) serves every case, sorun_adm_with_model_opts()drops its NOLINT. The fixture now takes the bit depth.test_adm_two_views_exactcovers 25 keys at 8 and 10 bits withdebug, and 14 keys under the model options at 3H/5H.test_adm_merged_registrations_exactregistersadm_sycltwice, as two models do, against one CPU context.==.test_adm_view_merge.c: theadm_syclrow flips to merging.test_adm_view_dist_contract.py: the SYCL option table joinsMERGING_TABLES, and the table parser reads C++ tables.docs/metrics/adm.md,core/src/feature/sycl/AGENTS.d/adm.md,core/src/feature/AGENTS.d/adm-view-distance-merge.md, the changelog fragment and the rebase note.Evidence
All device runs are on the Arc A380 under
sycl-a380.lock, built and run in the pinned dev image (oneAPI 2026.1,CC=icx CXX=icpx, AOTdg2-g11).test_sycl_adm_paritytest_adm_two_views_exactcompares 25 values at 8 bits, 25 at 10 bits and 14 under the model options;test_adm_merged_registrations_exactcompares 14. All use==--precision max,vmaf_v1.0.16_3d0h+_5d0htogether, 576x324 pair, 48 frames: SYCL against CPUfeature_backends) of the two-model runadm_sycld_accum; host conclusion with the first distance's weights;adm_syclwithout.mergetest_adm_two_views_exact(the_nvd_5or first-distance scores differ); the last failstest_adm_view_mergetest_sycl_kernel_scratchtest_adm_view_merge,test_integer_adm_view_dist,test_adm_view_dist_contract.pyinteger_adm_sycl.cpp,test_sycl_adm_parity.ctest_adm_view_merge.cscripts/dev/preflight.sh --stage msvcism4007c9801+ #264710d0013d6(this head,252c00ea7)test_sycl_adm_parity9 of 9,test_sycl_kernel_scratch3 of 3,test_adm_view_merge11 of 11GOLDEN_NINJA_JOBS=4) on the top of the stack (the #2660 head before this rebase,2a934db95, which contained this commit)Type
feat— new featurefix— bug fixperf— performance improvementrefactor— no behavior changedocs— documentation onlytest— test-onlybuild/ci— tooling / infraport— cherry-pick from upstream Netflix/vmafsycl/cuda/simd— backend-specificChecklist
git commit -s; fix a branch withgit rebase --signoff origin/master). See DCO sign-off.make format && make lintis green locally. Not run as one target. These are green: the commit hooks and tidy above.python3 scripts/ci/run_meson_test.py -- -C build. See Evidence./cross-backend-diffand the worst ULP is ≤ 2. 0 ULP: the twin's outputs equal the CPU's (==tests)..c/.cpp/.cu/.h/.hpp, it has the appropriate license header (seeCONTRIBUTING.md). No new source file.!orBREAKING CHANGE:and the migration path is documented below. Not a breaking change.docs/adr/_index_fragments/<NNNN-slug>.mdand nothing else is touched for the index. No new ADR: ADR-2795 (port(upstream): libvmaf/adm: share computation across viewing distances (cffd5b77d + 33e5f0aca) #2646) decides the GPU twins' step.Bug-status hygiene (ADR-0165)
docs/state.mdupdated in this PR with a row in the appropriate section (Open / Recently closed / Confirmed not-affected / Deferred). Not needed — no state delta: a feature step of the upstream port; it opens and closes no bug.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests, except by porting Netflix's own updated assertion verbatim from upstream (value and places as upstream has them, measured against the fork's CPU build first; ADR-1828).Cross-backend numerical results
adm_syclagainst the CPU, both distances: 0 differences intest_sycl_adm_parity(25 values withdebugat 8 and 10 bits, 14 values with the model options, 14 values for the merged registrations).adm.syclstays declared exact (scripts/ci/exact_twins.d/adm.sycl).Deep-dive deliverables (ADR-0108)
AGENTS.mdinvariant note —core/src/feature/sycl/AGENTS.d/adm.mdandcore/src/feature/AGENTS.d/adm-view-distance-merge.md.changelog.d/added/adm-sycl-shared-viewing-distances.md.docs/rebase-notes.d/adm-sycl-shared-viewing-distances.md.Reproducer
Known follow-ups
admtwins: feat(hip): evaluate two ADM viewing distances in one adm_hip instance #2659 and feat(metal): evaluate two ADM viewing distances in one integer_adm_metal instance #2660, stacked on this one.