Skip to content

fix(feature): refuse a second float_adm debug instance and file the twins' debug key unsuffixed - #2265

Merged
lusoris merged 1 commit into
masterfrom
fix/float-adm-debug-key-refusal
Oct 6, 2026
Merged

lusoris merged 1 commit into
masterfrom
fix/float-adm-debug-key-refusal

Conversation

@lusoris

@lusoris lusoris commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes T-FLOAT-ADM-DEBUG-KEY-UNSUFFIXED-2026-10-01 (maintainer decision Q-015: keep the unsuffixed key, refuse the second instance, align the twins).

  • The unsuffixed adm key stays: it is the Netflix golden contract and python/test/ is untouched.
  • feature_extractor_vector_append() refuses a second context whose extractor declares the same unsuffixed_debug_key with debug set. vmaf_use_feature() returns -EINVAL and the log names the key and the holder. vmaf --feature float_adm=debug=true --feature float_adm=debug=true:adm_enhn_gain_limit=1.2 now stops with problem loading feature extractor: float_adm after that message, before any frame (it used to fail at frame 0 with "problem reading pictures"). New field VmafFeatureExtractor::unsuffixed_debug_key; debug is read from the parsed options (vmaf_feature_extractor_context_debug_key()).
  • The CPU extractor and the CUDA, SYCL, HIP and Metal twins declare the key; the twins list adm_scale0 where they listed adm (as the CPU does), so they file the ratio unsuffixed. Every option case of test_cuda_float_adm_parity and the shared float_adm_twin_parity.h now compares the unsuffixed adm too (18 keys instead of 17).
  • ADR-2056 (Q: "Named refusal + align twins (Recommended)"); docs/metrics/adm.md and an AGENTS.d page describe it.
  • Tests: test_float_adm_debug_key_refusal (4 cases; fails without the refusal), test_cuda_float_adm_parity 17 of 17 on the RTX 4090 (CUDA build in a scratch dir), fast suite of the CPU build. make test-netflix-golden's pytest set: 280 passed, 3 skipped (run against core/build-golden of this tree).
  • Not run: the SYCL, HIP and Metal twins were edited by text (one list entry and one initialiser line each); float_adm_twin_parity.h is compiled by their parity tests, not by anything built here. tidy: cpu core/src/feature/float_adm.c core/src/fex_ctx_vector.cpp core/src/feature/feature_extractor.cpp core/test/test_float_adm_debug_key_refusal.c 0 findings; cuda float_adm_cuda.c + test_cuda_float_adm_parity.c 0; hip float_adm_hip.c 0; sycl float_adm_sycl.cpp 0.

Reproducer

meson setup build core -Denable_cuda=false -Denable_sycl=false && ninja -C build test/test_float_adm_debug_key_refusal tools/vmaf
build/test/test_float_adm_debug_key_refusal

Deliverables (ADR-0108)

  • Research digest — no digest needed: trivial.
  • Decision matrix — ADR-2056 ## Alternatives considered.
  • AGENTS.md invariant note — core/src/feature/AGENTS.d/float-adm-debug-key.md.
  • Reproducer / smoke-test command — above.
  • CHANGELOG fragment — changelog.d/fixed/float-adm-debug-key-refusal.md.
  • Rebase note — docs/rebase-notes.md.
  • Docs — docs/metrics/adm.md.
  • State — row moved to Recently closed.

…wins' debug key unsuffixed (#2265)

* fix(feature): refuse a second float_adm debug instance and file the twins' debug key unsuffixed

Two float_adm instances with debug=true both file the ratio under the key
adm, which is never suffixed with the options because the Netflix tests read
it, so the second failed the run at the first frame with "problem reading
pictures". The CUDA, SYCL and HIP twins listed adm in provided_features and
suffixed it, so their debug key differed from the CPU's under any option.

feature_extractor_vector_append() now refuses a second context whose extractor
declares the same unsuffixed_debug_key with debug set: vmaf_use_feature()
returns -EINVAL and the log names the key and its holder. The CPU extractor and
the four twins declare the key; the twins list adm_scale0 as the CPU does, and
the twin parity cases compare the unsuffixed adm under every option.

Closes T-FLOAT-ADM-DEBUG-KEY-UNSUFFIXED-2026-10-01.
@lusoris
lusoris force-pushed the fix/float-adm-debug-key-refusal branch from 1c59bab to 75699f4 Compare October 6, 2026 11:57
@lusoris
lusoris merged commit 75699f4 into master Oct 6, 2026
6 of 62 checks passed
@lusoris
lusoris deleted the fix/float-adm-debug-key-refusal branch October 6, 2026 11:57
@github-actions github-actions Bot added the type:bug Something isn't working label Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant