Repository navigation
fix(metal): complete dispatch table 7->17 + coverage-audit test + doc/parity claims (RC audit) - #986
Merged
Merged
Conversation
The Metal dispatch support table (g_metal_features[] in
core/src/metal/dispatch_strategy.c) recognised only 7 of the 17
registered Metal extractors, so vmaf_metal_dispatch_supports() returned
0 for the other 10 — they silently fell back to CPU even on Apple
Silicon. Enumerate all 17 registered extractors and add every missing
registry name + provided_features key, verified 1:1 against each .mm's
provided_features[] source-of-truth (integer_ssim, float_vif,
integer_vif, float_adm, integer_adm, integer_ciede, integer_psnr_hvs,
integer_cambi, ssimulacra2, plus the float_ms_ssim_metal registry name
and motion3_v2_score / float_ssim_l/c/s keys).
Update the stale, self-contradictory coverage-audit test
(core/test/test_metal_kernel_coverage_audit.c): basenames 8 -> 17,
EXPECTED_KERNEL_COUNT 8 -> 17, and replace the now-shipped phantom names
(vif_metal / adm_metal / ciede2000_metal / ssimulacra2_metal — the last
would assert-fail) with genuinely non-existent names so the
wildcard-regression guard stays honest.
Docs + parity-claim corrections:
- docs/backends/metal/index.md + docs/backends/index.md: 8 -> 17
wired/registered/parity-tested; drop the 'future ports' paragraph
that called live VIF/ADM/CIEDE/CAMBI/SSIMULACRA2 kernels future.
- core/src/feature/metal/AGENTS.md: rewrite the 'Rebase-sensitive
invariants' section so it no longer tells agents the 9 wired files
are dead/deleted; extend the kernel table to all 17.
- Scope the 'every twin' parity claim (changelog + docs/state.md): the
SpEED family (speed_chroma / speed_temporal) has CUDA/SYCL/HIP twins
but no Metal twin — a known gap.
- Remove the float_psnr_metal enable_chroma changelog fragment + the
rendered CHANGELOG.md lines: float_psnr_metal registers options[] =
{{0}} (Y-only, no chroma), so the option does not exist.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
RC audit fix (Metal completeness). The Metal dispatch table recognised only
7 of 17 registered Metal extractors, the coverage-audit test was stale + would
assert-fail once the table was completed, and several docs/changelog claims
contradicted the shipped code.
core/src/metal/dispatch_strategy.c:g_metal_features[]extended 7 → 17extractors (added the 10 missing registry names + every
provided_featureskey, copied 1:1 from each
.mm; restoredfloat_ms_ssim_metal). 111 entries,no dups/extras.
core/test/test_metal_kernel_coverage_audit.c: basenames +EXPECTED_KERNEL_COUNT8 → 17; replaced the now-real phantom names (esp.
ssimulacra2_metal, whichwould have assert-failed) with genuinely-nonexistent names; fixed false
"no Metal kernel yet" comments.
docs/backends/metal/index.md+docs/backends/index.md"8 kernels" →17 wired/registered/parity-tested, removed the "future ports" paragraph;
rewrote
core/src/feature/metal/AGENTS.mdinvariants (the 9 wired files arenot dead).
scoped the false "9/9 every twin" claim (
changelog.d/.../metal-standalone-metrics.md,docs/state.md) to "standalone sweep complete; SpEED remains a known Metal gap".float_psnr_metal enable_chromachangelog claim (the coderegisters
{{0}}, no chroma) + the rendered CHANGELOG lines..mm/.metal+ theenable_metal-gateddispatch_strategy.c/coverage-audit test cannot compile on Linux. Verified hereby gcc
-fsyntax-onlyon the extracted table,clang-format --Werror, and across-consistency check (17 names, 111 keys, 5 phantoms absent). CPU-only build
green (1219/1219).
Reproducer / smoke test
Deep-dive deliverables (ADR-0108)
core/src/feature/metal/AGENTS.md(kernel table extended to 17; dropped the dead-files claim).changelog.d/fixed/metal-dispatch-table-completeness.md.Docs:
docs/backends/metal/index.md+docs/backends/index.mdupdated (user-discoverable backend surface).