Commit ac130ed
committed
mapreduce: add exact-arithmetic regression test for strided mixed reductions
Follow-up to the #7 resolution, addressing the adversarial-review caveats: the
prior comment overstated coalescing for a small leading dim, and the empirical
sweep left nothing committed and used Float32 (which can pass or fail for the
wrong reason on large sums).
Tighten the comment to the precise mechanism (the miscompile needs adjacent
lanes a *full* stride apart on every lane; reducing dim 1 keeps a contiguous
innermost axis, so lanes read stride-1 within each length-n1 run) and add an
Int32 regression test covering dims=(1,3)/(1,4)/(1,2,3) plus the coalesced
dims=2/3 cases. Int32 is exact and associative, so it is immune to the
Float32 accumulation-order rounding that made a stress sweep of >2^24-length
sums look corrupted when it was not; verified all cases match the CPU exactly,
including small leading dims and large strided sizes.
Refines PR_REVIEW.md finding #7.1 parent df6c1a4 commit ac130ed
2 files changed
Lines changed: 33 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
209 | 214 | | |
210 | 215 | | |
211 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
0 commit comments