Skip to content

test(hip): kernel parity coverage round 3 — 4 new HIP tests (ADR-0945) - #443

Merged
lusoris merged 1 commit into
masterfrom
test/hip-kernel-coverage-round3
May 31, 2026
Merged

lusoris merged 1 commit into
masterfrom
test/hip-kernel-coverage-round3

Conversation

@lusoris

@lusoris lusoris commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Round 3 of the HIP kernel parity-test coverage rollout. Adds 4 new
parity tests under core/test/, continuing from PR #351 (round 1,
ADR-0868: psnr_hip + vif_hip) and PR #372 (round 2, ADR-0883:
ciede_hip, psnr_hvs_hip, motion_hip, integer_ssim_hip,
integer_ms_ssim_hip).

Per-kernel count:

Test Extractor Feature key(s) Tolerance
test_hip_cambi_parity cambi_hip Cambi_feature_cambi_score 1e-3 (places=3)
test_hip_float_adm_parity float_adm_hip VMAF_feature_adm2_score + 4 scale ratios 1e-4 (places=4)
test_hip_float_motion_parity float_motion_hip VMAF_feature_motion_score 1e-4 (places=4)
test_hip_float_psnr_parity float_psnr_hip float_psnr (luma) 1e-4 (places=4)

Coverage delta: HIP backend rises from 9/17 to 13/17 parity-gated extractors (~76%, exceeding CUDA's ratio).

Round-4 backlog (deferred — documented in ADR-0945):

ADR-0108 deliverables (six required for fork-local PRs)

  1. Research digest: docs/research/hip-kernel-coverage-round3-2026-05-31.md
  2. Decision matrix: ADR-0945 ## Alternatives considered (5 options)
  3. AGENTS.md invariant: no rebase-sensitive invariants — new tests strictly follow the existing GPU-init skip-guard pattern already documented in core/test/AGENTS.md lines 38-44
  4. Reproducer: see Test plan below
  5. Changelog fragment: changelog.d/added/hip-kernel-coverage-round3.md
  6. Rebase notes: appended to docs/rebase-notes.md — no rebase impact (HIP backend is fork-only, upstream has none)

Test plan

Local verification commands (replicates the CI gate):

# Configure with HIP enabled (host need not have an AMD GPU — tests will skip gracefully)
cd core && meson setup build-hip -Denable_hip=true -Denable_cuda=false -Denable_sycl=false

# Build the 4 new test executables
ninja -C build-hip test/test_hip_cambi_parity test/test_hip_float_adm_parity \
                   test/test_hip_float_motion_parity test/test_hip_float_psnr_parity

# Run them (expect skip-tagged passes on a host without AMD GPU)
for t in test_hip_cambi_parity test_hip_float_adm_parity \
         test_hip_float_motion_parity test_hip_float_psnr_parity; do
    ./build-hip/test/$t
done

# Or run the full gpu suite
meson test -C build-hip --suite gpu

Verified locally:

  • All 4 tests build under enable_hip=true -Denable_hipcc=false
  • All 4 tests pass on a host without AMD GPU (skip path exercised: [skip: HIP scaffold ENOSYS on feed])
  • pre-commit run --files <changed> — clean
  • scripts/ci/assertion-density.sh — clean (161 asserts across 99 fork-added functions, avg 1.63)
  • scripts/ci/check-copyright.sh — clean
  • No regression in pre-existing parity tests (test_hip_adm_parity, test_hip_cambi_parity, test_hip_smoke all OK; the pre-existing test_hip_motion3_parity failure is unrelated to this PR and predates round 3)

Related work

🤖 Generated with Claude Code

@lusoris

lusoris commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

parity sweep audit: clean, no symmetric bug.

Verified all 4 new test files use the correct HIP-suffixed registry names:

  • test_hip_cambi_parity.c -> cambi_hip (registered at core/src/feature/hip/integer_cambi_hip.c:939)
  • test_hip_float_adm_parity.c -> float_adm_hip (core/src/feature/hip/float_adm_hip.c:911)
  • test_hip_float_motion_parity.c -> float_motion_hip (core/src/feature/hip/float_motion_hip.c:596)
  • test_hip_float_psnr_parity.c -> float_psnr_hip (core/src/feature/hip/float_psnr_hip.c:442)

CPU baselines (cambi, float_adm, float_motion, float_psnr) all resolve correctly in the CPU registry. No fix needed.

@lusoris
lusoris marked this pull request as ready for review May 31, 2026 04:21
@lusoris
lusoris enabled auto-merge (squash) May 31, 2026 04:21
@lusoris
lusoris marked this pull request as draft May 31, 2026 09:01
auto-merge was automatically disabled May 31, 2026 09:01

Pull request was converted to draft

lusoris added a commit that referenced this pull request May 31, 2026
…#443 follow-up) (#451)

Co-authored-by: Lusoris <lusoris@pm.me>
@lusoris
lusoris marked this pull request as ready for review May 31, 2026 12:30
@lusoris
lusoris force-pushed the test/hip-kernel-coverage-round3 branch from 75977ea to b98d5db Compare May 31, 2026 12:42
@lusoris
lusoris merged commit 83a3c8e into master May 31, 2026
17 of 57 checks passed
@lusoris
lusoris deleted the test/hip-kernel-coverage-round3 branch May 31, 2026 12:42
@lusoris lusoris added this to the 1.0.0 — First release milestone Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant