es-ude / es-ude/OnDeviceTraining
bfp test debt: backward staging-width fixtures + permutation-aware reduce fixtures
- Dominant language
- C
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 8
Description
Follow-up from BFP epic PR5 (#435, review ledger "known deferrals" 3 + task-1 deferral). Two suite blind spots, both "tests missing, code believed correct" — one test-debt issue.
## 1. Epic-wide: no backward test exercises FLOAT32-operand staging WIDTHS
When a FLOAT32-stored operand enters the funnel under `ARITH_BFP`, it is staged (quantized) at the op's anchor widths (outputQ forward / propLossQ backward — the R-N1 rule). The width effect of that staging is pinned exactly once, in a *forward* LayerNorm fixture. A regression in *backward* staging (e.g. anchor mix-up propLossQ↔outputQ, or width fallback to a default) would keep the whole suite green.
Scope: targeted fixtures in the GEMM-family and norm backward tests whose gold values are sensitive to the staged width (two widths whose results differ, per the forward LN-B precedent).
## 2. Reduce BFP arms: no permutation-aware fixture
`meanOverTrailingAxesBfp` / `varianceBiasedOverTrailingAxesBfp` are tested only with identity `orderOfDimensions`. BFP blocking binds to storage order, and the zero-copy-transpose hazard is THE structural BFP trap — yet no reduce test exercises a transposed view.
Scope: reduce fixtures on permuted shapes (storage order != logical order) with golds derived from the storage-order walk.
Part of the #410 epic hygiene trail.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Contributor guide
Research direction
Start by reading the existing forward LayerNorm fixture, then inspect the GEMM-family and norm backward tests and the meanOverTrailingAxesBfp and varianceBiasedOverTrailingAxesBfp reduce tests. Add backward fixtures covering two staging widths and permuted-shape reduce fixtures with storage-order golds; the suite should exercise both blind spots.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100