perf(metal): opt-in DV_METAL_FP16 reduced-precision inference#4
Conversation
|
Concordance gate cleared. chr20 / HG002 (50×) scored against GIAB v4.2.1 truth in the confident regions via RTG
At the call level the two are not merely close but identical: 97,527 PASS calls each, 0 differing (locus + ref + alt + GT). The ~1.3% genotype jitter measured earlier lives entirely at borderline RefCall/NoCall sites that never surface as PASS variants; high-confidence calls are robust to fp16 precision. Caveats: single chr20 sample on GRCh37, one fp32 draw (the default Marking ready for review. |
0cd41f8 to
2724a87
Compare
|
Heads-up @nh13: I had to squash Side effect: this rewrote the base of your 4 open PRs (#3, #4, #6, #7), so they now show an inflated diff against Sorry for the churn, and thanks again for all the fixes. Your authorship is preserved via a |
2724a87 to
a21e4d4
Compare
Gate MPSGraph precision on DV_METAL_FP16: when set, use optimizationLevel1 + reducedPrecisionFastMath=Default (FP16 Winograd / operand conversion) instead of the forced Level0/FP32 path. Default (unset) is unchanged and remains contractual full FP32. Validated on chr20 (HG002, 4731 examples): metadata and record order are identical to FP32, and fp16-vs-fp32 genotype-call agreement is 60/4731 (1.27%) — exactly the FP32 backend's own run-to-run nondeterminism baseline, i.e. reduced precision adds no divergence beyond what the default metal backend already exhibits. A true ANE path is not added: the 7-channel Inception-v3 input is rejected by the ANE, so MPSGraph stays on the GPU. Any default flip should still be gated behind GIAB concordance.
Reword the nonstandard 'FP19/TF32' to 'TF32 (19-bit)' — TF32 is the 19-bit operand format; it is not FP16 (already named as the Winograd path).
Draft — depends on #2, and should not merge until a GIAB F1/concordance run confirms accuracy. Default behavior is unchanged (gated on
DV_METAL_FP16=1).Lets MPSGraph use FP16 fast-math (
optimizationLevel1+reducedPrecisionFastMath=Default) instead of the forced Level0/FP32 path.Preliminary validation (chr20, HG002, 4731 examples)
metalbackend already exhibits.call_variantsstage is I/O-bound reading the example shards, which masks the GPU backbone gain).A true GIAB F1/concordance run is the merge gate before this default is ever flipped.
Not included: ANE
A real ANE path is not added — the 7-channel Inception-v3 input is rejected by the ANE, so MPSGraph stays on the GPU. The existing
ane_speculatescaffold is untouched.