Repository navigation
fix(sycl): emit motion3 from float_motion_sycl and pin the SYCL twin-parity cases - #1914
Merged
Merged
Conversation
5 of 26 tasks
lusoris
force-pushed
the
fix/sycl-float-motion3-and-option-tests
branch
from
October 3, 2026 11:37
68e1c4d to
e428c64
Compare
…parity cases (#1914) * fix(sycl): emit motion3 from float_motion_sycl and pin the SYCL twin-parity cases float_motion_sycl provided motion and motion2 only. A `--backend sycl --feature float_motion` run wrote no motion3, with no warning, and a request with motion_blend_factor or motion_blend_offset fell back to the CPU. The twin now provides VMAF_feature_motion3_score and declares both blend options, as CUDA (#1637) and HIP (ADR-1404) do. motion3 is the CPU's motion_blend_clip() of motion2: frame 0 from the first SAD, the tail from flush(), 0 for a one-frame run, 0 under motion_force_zero. Only host code changed; no kernel was touched. FEATURE_METRICS["float_motion"] in both cross-backend gates now lists motion3, so a twin that loses it fails the cell. test_sycl_twin_option_parity gains the motion3 cases, plus the #1645 regression cases it never had: flat identical frames, a single-pixel frame, apsnr with --subsample 2, and motion_v2 weight, cap and one frame. It also gains test_twin_options_are_cpu_options. Arc A380, --precision max, CPU against SYCL: every output is identical on the Netflix pair, both 1080p checkerboards and BBB 4K, with and without the options, and for one frame. The gate's float_motion cell is 0 for CUDA, SYCL and HIP.
lusoris
force-pushed
the
fix/sycl-float-motion3-and-option-tests
branch
from
October 3, 2026 12:02
e428c64 to
72379c8
Compare
This was referenced Oct 5, 2026
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
float_motion_syclnow emits the CPU'smotion3and takesmotion_blend_factor/motion_blend_offset, which closes the SYCL part ofT-GPU-FLOAT-MOTION3-MISSING-2026-09-30. Before this, a--backend sycl --feature float_motionrun wrote nomotion3and gave no warning, and a request with a blend option ran on the CPU. The parity gate'sfloat_motioncell now comparesmotion3too, so a CUDA, SYCL or HIP twin that loses it fails the cell.test_sycl_twin_option_paritygains themotion3cases and the #1645 regression cases it never had, which is the SYCL test-only part ofT-GPU-TWIN-PARITY-GAPS-OUTSIDE-CUDA-2026-09-30.Base:
master9aa990455, one commit.What changed
core/src/feature/sycl/float_motion_sycl.cppchanges host code only. No kernel is touched, so no kernel changed. It providesVMAF_feature_motion3_scoreand declaresmotion_blend_factor(mbf) andmotion_blend_offset(mbo) exactly as the CPU table does.motion3ismotion_blend_clip()ofmotion2, as infloat_motion.c,float_motion_cuda.c(fix(cuda): match the CPU motion order, option tables and tiny-frame guards #1637) andfloat_motion_hip.c(ADR-1404):flush();motion_force_zeropublishes 0.collect()is split intomotion_emit_first()andmotion_emit()so it stays inside HISS-04.motion_five_frame_windowis an option of the integermotion/motion_v2extractors only; the CPUfloat_motionhas none, and neither does the twin.FEATURE_METRICS["float_motion"]listsmotion3inscripts/ci/cross_backend_parity_gate.pyandscripts/ci/cross_backend_vif_diff.py.core/test/test_sycl_twin_option_parity.cgets these cases, mirroringtest_cuda_twin_option_parity.cand themotion_v2cases oftest_hip_twin_option_parity.c. The float-motion and integer-motion cases compare with==.motion3; all four score options together;motion_fps_weight=2:motion_max_val=4; one frame;motion3_force_0; option-table rows formotion_blend_factor/mbf/motion_blend_offset/mbo.float_ssim(8 and 10 bit,enable_dbwith and withoutclip_db) andssim(+inf); a 1x1 10-bitssimframe;apsnr_*with--subsample 2;motion_v2withmotion_fps_weight, with a clippingmotion_max_valand with both; a one-framemotion_v2run, with and without the options.test_twin_options_are_cpu_optionsfails when a SYCL twin declares an option that its CPU extractor lacks or declares differently.Docs:
docs/metrics/motion.md,docs/backends/sycl/overview.md(new section),docs/development/cross-backend-gate.md,docs/development/rebase-sensitive-invariants.md(thefloat_motion_syclentry; it also fixes the stale sub-group size, now 16 per ADR-1468), andcore/src/feature/sycl/AGENTS.d/float-motion.mdwith its index row.Verification
All on
ryzen-4090-arc, with each device run under its lock.--precision max,--backend cpuagainst--backend sycl --feature float_motion=...(feature_backendsnamesfloat_motion_sycl): Netflix 576x324 and both 1080p checkerboards. Each with the defaults,motion_blend_factor=0.5:motion_blend_offset=2,motion_fps_weight=2:motion_max_val=4,motion_fps_weight=2:motion_blend_factor=0.25:motion_blend_offset=3:motion_max_val=5andmotion_force_zeromotion/motion2/motion3value and every pooled value identical: 48 of 48 and 3 of 3--frame_cnt 1)motion3= 0float_motioncell, now withmotion3, exact, Netflix pair and both checkerboardsERROR (missing metrics: ... sycl lacks ['motion3']): the gate now sees the gaptest_sycl_twin_option_parityfloat_motion_sycl.cpp; #1645's changes undone (identical windows forced to 1 in both SSIM kernels, no TEMPORAL flag onpsnr_sycl, raw SAD stored, noflush()output below two frames); a planted declaration mismatch (mbodefault 41)float_ssiminfagainst 72.247198959355487,ssiminfagainst 156.53559774527022,apsnr_y40.764497719405341 against 40.770127717829908, SADmfw_222.34 against 44.68;motion3and the one-frame scores missing;test_twin_options_are_cpu_optionsnamesfloat_motion_sycl.motion_blend_offset. The flat-framessim+infsub-case passes either way, because the CPU's value is+inftoofastsuitegpu-suite test alone under the A380 locktest_cuda_parity_gate_default_runis not run here: this build has no CUDAVMAF_SYCL_AOT_JOBS=8 meson test --suite sycl-aottest_cuda_parity_gate_default_run; full default gate CPU↔CUDAscripts/ci/test_cross_backend_parity_gate.py,test_parity_gate_metric_names.py,test_parity_gate_covers_registered_twins.py,test_cross_backend_feature_names.pytest_sycl_kernel_source_contract.py(planted regressions),test_sycl_kernel_scratch,test_sycl_sub_group_size_contract,test_feature_extractorpraetorctl auditscripts/dev/preflight.sh --stage msvcism,test_win32_pthread_shim_contract.pypraetorctl caveman checkonAGENTS.d/float-motion.mdsycllane in the dev container (scripts/dev/tidy-lane.sh sycl)core/src/feature/motion_window.h:36modernize-use-using(155 against baseline 154). It comes from the C++ includersinteger_motion{,_v2}_sycl.cppthat #1893 added and is fixed in #1915 (with it applied the lane matches its baseline, 154, exit 0)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
make format && make lintis green locally. (clang-format, black, ruff and markdownlint ran through the commit hooks;praetorctl auditPASS; the clang-tidysycllane is in the table above.)python3 scripts/ci/run_meson_test.py -- -C build. (SYCL build: 261 device-free tests and 67 device tests.)/cross-backend-diffand the worst ULP is ≤ 2. (Gate cells exact, 0 on CUDA, SYCL and HIP.)motion3; Metal is listed.).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 breaking: the twin gains an output and two options the CPU has.)docs/adr/_index_fragments/<NNNN-slug>.mdand the slug is appended todocs/adr/_index_fragments/_order.txt. (No ADR: this applies ADR-0219 / ADR-1404's existing decision to the SYCL twin.)Bug-status hygiene (ADR-0165)
docs/state.mdis updated.T-GPU-FLOAT-MOTION3-MISSING-2026-09-30: SYCL part fixed with the A380 evidence; it stays open for Metal.T-GPU-TWIN-PARITY-GAPS-OUTSIDE-CUDA-2026-09-30: the SYCL regression cases have landed, with the fail-without-fix evidence; it stays open for Metal.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests. (No CPU extractor and no Python test changed.)Cross-backend numerical results
Deep-dive deliverables (ADR-0108)
motion3; the twin reproduces it).AGENTS.mdinvariant note —core/src/feature/sycl/AGENTS.d/float-motion.md(index row regenerated), plus thefloat_motion_syclentry indocs/development/rebase-sensitive-invariants.md.changelog.d/fixed/sycl-float-motion-motion3.md.docs/rebase-notes.md, "float_motion_syclemitsmotion3(2026-10-03)".Reproducer
Known follow-ups
motion_window.hmodernize-use-usingfinding that keeps the master sycl tidy lane one above its baseline.float_motion_metalstill emits nomotion3, and the Metal twins still have the four items ofT-GPU-TWIN-PARITY-GAPS-OUTSIDE-CUDA-2026-09-30. Not run: they need an Apple device.float_motion_syclstill does not declaremotion_add_scale1,motion_add_uvormotion_filter_size. A request that sets one of them runs on the CPU (ADR-1183), as before;float_motion_hiphas them (ADR-1404).