Skip to content

fix(dnn): update int8-missing test to reflect ADR-1032 fp32-fallback - #697

Closed
lusoris wants to merge 2 commits into
masterfrom
fix/dnn-int8-fallback-test-update-adr1032
Closed

lusoris wants to merge 2 commits into
masterfrom
fix/dnn-int8-fallback-test-update-adr1032

Conversation

@lusoris

@lusoris lusoris commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • test_session_open_int8_missing_returns_error was asserting rc < 0 when .int8.onnx is absent, but PR fix(libvmaf,dnn): vmaf_init double-init guard + vmaf_close pointer-zero + DNN fallback path #642 (ADR-1032) intentionally changed vmaf_dnn_session_open to fall back to the fp32 baseline instead of returning an error.
  • The test was not updated to match the new policy, causing libvmaf:dnn / test_dnn_session_api to fail in CI.
  • Rename the test to test_session_open_int8_missing_falls_back_to_fp32 and flip the assertions to verify the fp32 fallback path: rc == 0, session pointer populated, session usable.

Root cause

Commit 1958126bb (PR #642, ADR-1032) changed the behavior in core/src/dnn/dnn_api.c (lines 108–119): on missing .int8.onnx, rc is now set to 0 and execution falls through to vmaf_ort_open with the original fp32 path. The test file was not updated in that PR.

Reproducer

meson setup core/build -Denable_dnn=true -Denable_cuda=false -Denable_sycl=false
ninja -C core/build test/dnn/test_dnn_session_api
meson test -C core/build --suite=dnn --print-errorlogs
# Before fix: 6/12 test_dnn_session_api FAIL (exit status 1)
# After fix:  6/12 test_dnn_session_api OK

Checklist

  • no rebase impact: pure test-only fix, no public API touched
  • no digest needed: trivial — one-line behavioral policy already captured in ADR-1032
  • no alternatives: only-one-way fix — test must match the production behavior
  • no rebase-sensitive invariants
  • changelog.d/ fragment: not required for test-only fixes with no user-visible delta (ADR-0108 §exclusions)
  • docs/state.md: not required — this is a test fix, not a bug open/close against production behavior

🤖 Generated with Claude Code

lusoris and others added 2 commits May 28, 2026 17:24
Following the ADR-0700 repo-layout rename (libvmaf/ → core/), five CI
workflow files still referenced the old source-directory path. This
caused CodeQL (Python/C++), Docker, FFmpeg-integration, nightly
clang-tidy, and supply-chain builds to fail, blocking all merges via
the Required Checks Aggregator.

Changes:
- docker-image.yml, ffmpeg-integration.yml: path filters libvmaf/** → core/**
- ffmpeg-integration.yml: meson setup sourcedir libvmaf → core (×3)
- supply-chain.yml: meson setup sourcedir libvmaf → core
- nightly.yml: cd libvmaf → cd core; find libvmaf/src libvmaf/tools → core/src core/tools
- tests-and-quality-gates.yml, libvmaf-build-matrix.yml: stale comments updated
- security-scans.yml: replace gitleaks-action@v2.3.9 (requires
  GITLEAKS_LICENSE on org repos) with direct gitleaks CLI binary
  install (Apache-2.0 CLI, no license required); keeps SARIF upload
- Repo: vulnerability alerts + dependency graph enabled via GitHub API

no user-discoverable surface change — CI infra repair
no digest needed: post-rename path fix, mechanical equivalent
no decision matrix needed: pure path-rename fix following ADR-0700
no rebase-sensitive invariants

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…p32-fallback

PR #642 (ADR-1032) changed vmaf_dnn_session_open to silently fall back to fp32
when the .int8.onnx sibling is missing, but the test was not updated to match.
The test was asserting rc < 0 (hard error) while the new policy returns rc == 0
(degraded-but-working fallback).

Rename test_session_open_int8_missing_returns_error →
test_session_open_int8_missing_falls_back_to_fp32 and flip the assertions to
verify the fp32 fallback succeeds and produces a usable session.

Fixes CI failure: libvmaf:dnn / test_dnn_session_api FAIL (exit status 1).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lusoris

lusoris commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of rebased version (conflict resolved by cherry-pick onto current master).

@lusoris lusoris closed this Jun 6, 2026
@lusoris
lusoris deleted the fix/dnn-int8-fallback-test-update-adr1032 branch June 8, 2026 15:53
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