feat(depth-pro): support FP16 conversion and evaluation#1119
Open
ssss141414 wants to merge 1 commit into
Open
Conversation
Contributor
Author
Independent reviewer verdict: APPROVEReviewed PR head Scope and engineering review
Commands independently re-run
Evidence audit
No blocking correctness, maintainability, scope, or evidence issue found. GitHub may reject a formal approval from the PR author's identity; this comment records the structured reviewer verdict instead. |
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
Adds verified CPU recipes for
apple/DepthPro-hfin FP32 and genuine FP16, and fixes two class-wide infrastructure defects exposed by the full Goal ladder:field_of_viewmetadata required by DepthPro post-processing.This replaces the intent of closed PR #943 against current
main.1. Recipe paths and auto-config diff
examples/recipes/apple_DepthPro-hf/cpu/cpu/depth-estimation_fp32_config.jsonexamples/recipes/apple_DepthPro-hf/cpu/cpu/depth-estimation_fp16_config.jsonThe exact-current-main auto-config (
e95011d355d63e9309be1e4d314d582a2e2d2afe) and shipped FP32 recipe are semantically identical; the generated build config has only the runtime bookkeeping field"auto": false. The FP16 recipe is the same input/output contract plusquant.mode: "fp16"andfp16_keep_io_types: true.examples/recipes/README.mdis intentionally unchanged: it indexes production built-in models, and skill-produced recipes do not meet that publication contract.2. Precision matrix
Available runtime providers on the validation host were
AzureExecutionProviderandCPUExecutionProvider. No GPU/NPU recipe or runtime claim is made without capable hardware. Static--ep allanalysis was still run for both artifacts.3. Build output directories
temp/rerun943/baseline_e95011d3_build/temp/rerun943/recipe_fp32_build/temp/rerun943/recipe_fp16_fresh_genuine/temp/rerun943/recipe_fp16_retry/4. Build logs
Exact-current-main baseline, with no recipe:
e95011d355d63e9309be1e4d314d582a2e2d2afewinml 0.2.0✅ Build complete in 588.4sFP32 recipe:
✅ Build completeFP16 recipe:
google.protobuf.message.EncodeErrorin ORT FP16 shape inference;apple/DepthPro-hfis the final L0 proof:✅ Build complete in 835.4s(export 537.9s, optimize 207.4s, FP16 84.2s);5. Findings
ModelProtofrom protobuf's serialization ceiling. ORT's default FP16 shape inference serializes the complete model, soconvert_to_fp16()now setsdisable_shape_inferfor models atEXTERNAL_DATA_THRESHOLDscale. Export and optimization have already populated shapes.WinMLModelForDepthEstimationpreviously discarded all outputs exceptpredicted_depth. DepthPro's processor requiresfield_of_view; the newWinMLDepthEstimatorOutputpreserves it while leaving it optional for single-output depth architectures.adding-model-supportskill repository asdepth_pro-004anddepth_pro-005; it is intentionally not mixed into this product-code PR.6. Optimum coverage probe
depth_prodepth-estimationdepth_proONNX taskdepth-estimationis availableWINML-ONLYThe exporter already existed; this contribution does not add checkpoint-specific exporter branching.
7. Reissued charter
Reality contradicted the historical recipe-only charter, so the planner reissued it:
8. Goal-ladder verdicts
[1,3,1536,1536]; both outputs present; 3,803,028,992-byte external data co-locatedpredicted_depth: relative L27.224452521572391e-07, cosine0.999999999999883;field_of_view: relative L27.430005631944269e-070.04516238443198268, RMSE0.18053944191186216, delta10.9685807291666667, 307,200 valid pixelspredicted_depth: relative L20.00023954855291130023, cosine0.9999999763468135;field_of_view: relative L24.861346542043536e-050.0451814304400756, RMSE0.1805982524308017, delta10.96857421875, 307,200 valid pixelsThe refreshed no-recipe FP32 baseline also passed build and one CPU perf iteration at p50 45,519.223ms with total RSS delta 10,132.10MB. Single-iteration CPU latency is noisy and this PR does not claim an FP32 speedup; its measurable deltas are genuine FP16 support and working task post-processing.
9. Methodology declaration
Methodology friction was observed: the historical recipe-only/L1 framing stopped before genuine precision and task-level validation. The active skill now requires broad precision attempts, a complete L0-L3 march, recipe-vs-auto-config reducibility, nested EP/device paths, all-EP static analysis, and no production README edit. Those methodology changes live on the skill's Lane A commit
8bb9b419a5e58ad90ccf2a1b6165c44ce6e3d757, not in this model PR.10. Perf and evaluation table
Dataset methodology:
sayakpaul/nyu_depth_v2,validation, revisionrefs/convert/parquet, streaming, no shuffle, one deterministic sample, image columnimage, depth columndepth_map, depth kinddepth.11. Operator analysis
winml analyze --ep allcompleted for both artifacts:ResizeandPadremain unknownruntime_support: falsemeans this was static rule coverage, not an OpenVINO runtime claimTop counts are unchanged apart from FP16 boundary Casts: Add 666, MatMul 577, Mul 432, Transpose 382, Reshape 303, Slice 259, LayerNormalization 147.
12. Reproduction commands
Post-rebase checks: 36 passed; Ruff: All checks passed.