Repository navigation
fix(test): drop the stale HIP ADM should_fail markers and give the shared ADM tests a fixture that can fail - #1493
Conversation
8180029 to
cdfd513
Compare
cdfd513 to
58fb4b2
Compare
|
The The #1494 raises that ceiling to 20 minutes. This branch is rebased onto current master; once #1494 lands, this should go green on its own. |
58fb4b2 to
be584d6
Compare
… ADM tests a fixture that can fail test_hip_adm_parity, test_hip_adm_small_border and test_hip_adm_wide_rounding kept `should_fail : true` from the ADR-1154 staging deferral after ADR-1211 (PR #1370) fixed it, so `meson test` on a HIP device exited non-zero on the unexpected pass. The other two failed in 40 ms because the shared CUDA/HIP sources asked for VMAF_integer_feature_adm3_score, which the HIP twin does not emit (-EINVAL), so no parity was ever compared. Skip adm3 under HAVE_HIP, name the failing feature and print every compared score. Replace the smooth-ramp fixture with a stateless lowbias32 texture at the same geometry: with the pre-ADR-1167 border defect planted back into adm_cm.hip the ramp moved adm2 by 7.5e-6 against the 1e-4 gate, the texture moves it by 4.0e-4 and fails the test. Clean HIP stays bit-identical to the CPU on every feature (20/20 runs per test, gfx1036, ROCm 7.2.4). The rounding placement the wide test was written for is not observable in any emitted score (the CPU casts the scaled accumulator to float); opened as T-ADM-CM-ROUNDING-PLACEMENT-UNOBSERVABLE-2026-09-19. Closes T-GAP-HIP-INTEGER-ADM-PICTURE-STAGING-DEFERRED-2026-09-02 and T-HIP-ADM-TESTS-STALE-SHOULD-FAIL-2026-09-18.
be584d6 to
a78630f
Compare
Summary
Three HIP integer ADM tests on
masterhid behind staleshould_fail : truemarkers. The markers cited the ADR-1154 picture-staging deferral, which ADR-1211 (PR #1370) ended two weeks ago, so on any machine with a ROCm devicemeson testreportedtest_hip_adm_parityas UNEXPECTEDPASS and exited non-zero. The other two,test_hip_adm_small_borderandtest_hip_adm_wide_rounding, "expectedly failed" in 40 ms for a reason the marker did not name: the shared CUDA/HIP sources ask forVMAF_integer_feature_adm3_score, which the HIP twin does not emit (no AIM pass, T-GPU-ADM-AIM-DEVICE-PASS-MISSING-SYCL-HIP-2026-09-05), sovmaf_feature_score_at_index()returned-EINVALbefore any parity was compared.Fixing the name alone was not enough. With
adm3skipped underHAVE_HIP, both tests passed bit-identical to the CPU, but planting the two pre-ADR-1167 defects back intoadm_cm.hipshowed the smooth-ramp fixture(row * 7 + col * 5) & 0xFFgave the contrast-masking kernel almost nothing to accumulate:adm_cm.hip(gfx1036, ROCm 7.2.4)i == 0 && top <= 0(ADR-1167 #1)test_hip_adm_small_borderfailsshift_inner_accum(pre-ADR-1167 HIP shape, #2)So the fixture is now a stateless lowbias32 texture at the same geometry (reference = full-range noise, distorted = reference + [-16, 15]; 160x96 keeps scale-3
top <= 0, 1920x144 keeps 60 warps per row). The tests name the failing feature and print every compared score.The rounding-placement class the wide test was written for does not reach any emitted score: the CPU divides each accumulator by
2^(52 - shift_cub - shift_inner_accum)and casts tofloatbefore scoring, so per-row differences vanish. The wide test remains a valid gate for the 60-warp column striding and the block reduction (the liveness row); the placement itself needs an accumulator-level test, opened asT-ADM-CM-ROUNDING-PLACEMENT-UNOBSERVABLE-2026-09-19. Alternatives weighed for the fixture: tightening the tolerance (cannot help, the deltas are exactly zero), a new separate test (leaves the two shared tests unable to fail), or readingaccum_globalthrough a debug feature (the right tool for the rounding class, out of scope here).Twins (ADR-1142): the CUDA arms of the two shared sources take the same fixture; CUDA and Metal twins emit
adm3_score, the SYCL parity test already excludes it. The CUDA arms were syntax-checked (-fsyntax-only -DHAVE_CUDA=1) but not run; please runtest_cuda_adm_small_borderandtest_cuda_adm_wide_roundingon the CUDA box before merge.Overlap: PR #1476 (
port/upstream-2026-09stack) carries the identicaladm3guard hunk and the same marker removal; those hunks merge clean, the fixture and print changes are separate hunks. #1480 touchescore/test/meson.buildandcore/src/feature/hip/AGENTS.mdin other regions; the AGENTS section this PR rewrites is separated from #1480's hunk by unchanged lines.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 clean, clang-tidy 0 findings on both test files (-p build/hip), cppcheck 0 for the HIP and CUDA arms, assertion density PASS,praetorctl auditPASS, caveman check PASS on bothAGENTS.mdfiles.meson test -C build/hip --num-processes 1 test_hip_adm_parity test_hip_adm_small_border test_hip_adm_wide_rounding→ 3 OK, exit 0; each test 20/20 consecutive direct runs./cross-backend-diffand the worst ULP is ≤ 2: no kernel change; HIP equals CPU exactly on every asserted feature (table above)..c/.cpp/.cu/.h/.hpp, it has the appropriate license header (seeCONTRIBUTING.md): no new files.!orBREAKING CHANGE:and the migration path is documented below: not breaking.docs/adr/_index_fragments/<NNNN-slug>.mdand the slug is appended todocs/adr/_index_fragments/_order.txt: no ADR; a test fixture and marker fix.Bug-status hygiene (ADR-0165)
docs/state.md:T-GAP-HIP-INTEGER-ADM-PICTURE-STAGING-DEFERRED-2026-09-02closed in place;T-HIP-ADM-TESTS-STALE-SHOULD-FAIL-2026-09-18closed (same ID as fix(gpu): make the integer ADM twins agree with the CPU on tiny frames and full-range content #1476's row so the two merge into one);T-ADM-CM-ROUNDING-PLACEMENT-UNOBSERVABLE-2026-09-19opened.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Cross-backend numerical results
Deep-dive deliverables (ADR-0108)
core/test/AGENTS.mdandcore/src/feature/hip/AGENTS.md.changelog.d/fixed/hip-adm-stale-should-fail.md.docs/rebase-notes.md.Reproducer
Known follow-ups
T-ADM-CM-ROUNDING-PLACEMENT-UNOBSERVABLE-2026-09-19: an accumulator-level test for where the CM kernels applyshift_inner_accum; no score-level gate can see it (CUDA, SYCL and Metal twins included).T-GPU-ADM-AIM-DEVICE-PASS-MISSING-SYCL-HIP-2026-09-05: the HIP and SYCL integer ADM twins still have no AIM pass, soadm3_scorestays with the CPU twin.integer_adm_hipkeeps.flags = 0: model-driven dispatch under--backend hipstill runs the CPUadm; the twin runs when named (--feature adm_hip).test_adm_small_border.c/test_adm_wide_rounding.cneed a run on the RTX 4090 (not driven from this session).