fix(perf): honor configured input value ranges - #1309
Draft
ssss141414 wants to merge 1 commit into
Draft
Conversation
ssss141414
added a commit
that referenced
this pull request
Aug 14, 2026
## Summary Adds CPU fp32/fp16 recipes for `nielsr/vitpose-base-simple` and fixes recipe-free VitPose input generation. Optimum's `VitPoseDummyInputGenerator` inherits a static Vision generator that reloads preprocessors and indexes the result with `[-1]`. Config-only resolution has no loaded processor, so that path raises `IndexError`. A WinML `VitPoseIOConfig` now preserves Optimum's VitPose I/O declarations and model patcher while replacing only its dummy generator with the config-driven `DummyVisionInputGenerator`. The workaround is contained in the existing VitPose model adapter. Generic export I/O behavior is unchanged. The generic Perf range-consumption change was split into #1309. The VitPose evaluator processor fallback was split into #1310. ## Baseline and outcome Without a recipe, current-main baseline export resolves `VitPoseOnnxConfig` but fails while its static dummy generator loads an empty processor list: ```text Error: Build failed: list index out of range ``` With this change, recipe-free input resolution produces `pixel_values` `[1, 3, 256, 192]`. The checked-in recipes represent verified CPU fp32/fp16 coverage. ## Validation - Final head: `5635a06aee12a2dfe3d2f0a4e7c92dc8ac00f8f1` - Recipe-free CPU fp32 `winml build`: passed; `pixel_values` `[1, 3, 256, 192]` float32 -> `heatmaps`; final `model.onnx` generated - Checked-in CPU fp32 recipe `winml build`: exit 0; completed in 73.5s; final `model.onnx` generated - Checked-in CPU fp16 recipe `winml build`: exit 0; completed in 82.7s (Export 38.0s, Optimize 35.3s, FP16 8.8s); final `model.onnx` generated - `tests/unit/export/test_io.py` + `tests/unit/models/test_vitpose_mapping.py`: 101 passed - Ruff check: passed - Ruff format check: passed - GitHub checks: 9/9 passed - Recipe README remains unchanged ## Files - `examples/recipes/nielsr_vitpose-base-simple/cpu/cpu/keypoint-detection_fp32_config.json` - `examples/recipes/nielsr_vitpose-base-simple/cpu/cpu/keypoint-detection_fp16_config.json` - `src/winml/modelkit/models/hf/vitpose.py` - `tests/unit/models/test_vitpose_mapping.py`
ssss141414
force-pushed
the
perf-input-value-ranges
branch
from
August 14, 2026 06:56
c572c66 to
d5b62bd
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.
Summary
Makes classic
winml perfhonorinput_value_rangespersisted inwinml_build_config.jsonwhen generating random model inputs.This generic Perf behavior fix was originally extracted from #1299 because it applies to every model that declares input ranges, not only VitPose. It is now rebased on the merged #1299.
Changes
WinMLSession.Compatibility
There is no public API change. Perf input distributions intentionally change for models whose build config declares a range; their generated inputs now match that contract instead of silently using the default range. Historical Perf measurements for those models may therefore differ.
Validation
tests/unit/commands/test_perf_cli.py: 122 passedtest_perf_cli.py,test_perf_genai.py,test_winml_session.py): 288 passed, 6 skippedFollow-up to merged #1299.