Commit ac3800b
committed
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>1 parent 6a3d817 commit ac3800b
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