Commit a43031e
Add comment explaining nesting
* Add comment explaining outer torch.autocast in bf16_master_weight example
The outer autocast covers loss_fn which runs outside engine.forward().
The nested autocast on the model forward is harmless.
Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
* Update training/bf16_master_weight/train.py
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
---------
Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>torch.autocast (#1000)1 parent ece52bc commit a43031e
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
| |||
0 commit comments