pytorch/torch/csrc/distributed
Andrzej Kotlowski 0885c58296 Add Bfloat16 scalar support to gloo backend (#113557)
There was missing support for bfloat scalars. When I use gloo backend
`torch.distributed.init_process_group(backend='gloo')`
and run
`torch.nn.parallel.DistributedDataParallel(model)`
and _model_ has Bfloat16 features I receive following error:
`RuntimeError: Invalid scalar type`

This change fix this issue.
c10::BFloat16 defines conversions from/to float, so calculations are made on float for bfloat.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/113557
Approved by: https://github.com/XilunWu, https://github.com/jgong5
2023-11-17 21:16:54 +00:00
..
autograd [Reland] Elimates c10::guts::to_string (#108748) 2023-09-07 13:35:17 +00:00
c10d Add Bfloat16 scalar support to gloo backend (#113557) 2023-11-17 21:16:54 +00:00
rpc Suppress warnings in tensorpipe.h (#111012) 2023-10-11 15:41:30 +00:00