Repository navigation
Commit b17f6ce
[PyTorch] Keep history and scale for zero amax in the unfused DelayedScaling update (#3966)
* [PyTorch] Keep history and scale for zero amax in the unfused DelayedScaling update
The fused update skips the history roll and keeps the scale when the
current amax is zero (a module that did not run), as documented in
fp8_delayed_scaling.rst. The unfused update rotated the history and, with
"max", recomputed the scale. Restore both for zero-amax entries, and
extend the fused/unfused comparison test to histories of length 4 and 1024.
Signed-off-by: Netanel Nagar <277444921+Nagarson@users.noreply.github.com>
* [PyTorch] Test two history columns in the fused/unfused update comparison
One column carries the case and the other is a control with a positive
amax and its own scale, so a change that froze every column would fail.
Signed-off-by: Netanel Nagar <277444921+Nagarson@users.noreply.github.com>
* Remove comment and test
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
---------
Signed-off-by: Netanel Nagar <277444921+Nagarson@users.noreply.github.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Co-authored-by: Pawel Gadzinski <pgadzinski@nvidia.com>1 parent 44f02f2 commit b17f6ce
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1215 | 1215 | | |
1216 | 1216 | | |
1217 | 1217 | | |
| 1218 | + | |
| 1219 | + | |
1218 | 1220 | | |
1219 | 1221 | | |
1220 | 1222 | | |
1221 | 1223 | | |
1222 | 1224 | | |
1223 | | - | |
1224 | | - | |
| 1225 | + | |
| 1226 | + | |
1225 | 1227 | | |
1226 | 1228 | | |
1227 | 1229 | | |
| |||
0 commit comments