Repository navigation
fix(dnn): preserve explicit int8 paths in session open - #2203
Merged
Merged
Conversation
…ing a frame twice (#2206) * fix(model): read a model collection's stored score instead of predicting a frame twice vmaf_score_at_index_model_collection() predicted every member model and wrote the members' and the four named bootstrap scores of the frame into the feature collector, which refuses a second write of a frame. A second per-frame call of a frame, or vmaf_score_pooled_model_collection() over a range holding a frame already scored per frame (its loop predicts every frame of the range again), therefore failed with -EINVAL ("feature ... cannot be overwritten"). No score was wrong; the call failed. A frame whose four named bootstrap scores are already in the collector now returns them, as vmaf_score_at_index() reads a single model's stored score first. The values are the first prediction's, bit for bit, so a pooled score equals a fresh session's. Upstream Netflix/vmaf has the same code. test_model_collection_score_repeat fails on master without the fix: the second per-frame call and the pooled call after a per-frame call both return -EINVAL. Golden gate 280 passed, 3 skipped.
…t index of vif_tools.c (#2204) * fix(feature): refuse a float_vif or SpEED prescaled plane past the int index of vif_tools.c vif_tools.c indexes a plane as y * stride + x in int. With vif_prescale or speed_prescale above about 1.414 at the 32768x32768 picture cap the prescaled plane passes INT_MAX samples, the index overflows and the resamplers write outside the plane (16K stays inside at every accepted prescale, up to 4.0). vif_plane_fits_int_index() in vif_tools.h is now checked by float_vif's init (init_scaled_plane()), speed.c's speed_init_dimensions() and speed_internal_init_dimensions(), the geometry of every SpEED device twin; such a plane fails init with -EINVAL before any allocation. No accepted input and no score changes. T-PRESCALED-PLANE-INT-INDEX-2026-10-05. Found by the RC3 accumulator audit. test_prescaled_plane_int_index fails on master's SpEED geometry.
* fix(dnn): preserve explicit int8 paths in session open When vmaf_dnn_session_open() was called with an explicit .int8.onnx path, resolve_load_path() lacked the kInt8Suffix early return present in dnn_attach_api.c, causing it to append a redundant .int8 suffix and derive <name>.int8.int8.onnx before falling back to the fp32 path. Preserve explicit int8 paths directly by returning 0 when the onnx_path already ends in kInt8Suffix, matching the behavior in dnn_attach_api.c. Closes T-DNN-SESSION-INT8-EXPLICIT-PATH-2026-10-05.
lusoris
force-pushed
the
fix/dnn-session-int8-explicit-path
branch
from
October 5, 2026 23:12
f49f17e to
0f7b2dd
Compare
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.
When
vmaf_dnn_session_open()was called with an explicit.int8.onnxpath,resolve_load_path()lacked thekInt8Suffixearly return present indnn_attach_api.c, causing it to append a redundant.int8suffix and derive<name>.int8.int8.onnxbefore falling back to the fp32 path.Preserve explicit int8 paths directly by returning 0 when the
onnx_pathalready ends inkInt8Suffix, matching the behavior indnn_attach_api.c.Evidence
core/test/dnn/test_dnn_session_api.c:test_session_open_explicit_int8_path_preserves_pathverifies explicit path preservation (failed on master: loadedmodel.int8.int8.onnxinstead of explicit model);test_session_open_int8_invalid_falls_back_to_fp32passes (40 of 40 pass).core/test/dnn/test_vmaf_use_tiny_model.c:test_use_tiny_model_int8_invalid_falls_back_to_fp32passes (25 of 25 pass).core/test/dnn/test_cli.sh: section 5c CLI tests pass.core/src/dnn/dnn_api.ccore/test/dnn/test_dnn_session_api.ccore/test/dnn/test_vmaf_use_tiny_model.c0 findings.Closes T-DNN-SESSION-INT8-EXPLICIT-PATH-2026-10-05.
Deep-dive deliverables (ADR-0108)