DeepSpeed icon indicating copy to clipboard operation
DeepSpeed copied to clipboard

[comms] fix deprecations

Open stas00 opened this issue 2 years ago • 4 comments
trafficstars

This PR Fixes:

/home/stas/anaconda3/envs/py38-pt113/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py:2387: UserWarning: 
torch.distributed._all_gather_base is a private function and will be deprecated. 
Please use torch.distributed.all_gather_into_tensor instead.
  warnings.warn(
/home/stas/anaconda3/envs/py38-pt113/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py:2849: UserWarning: 
torch.distributed._reduce_scatter_base is a private function and will be deprecated. 
Please use torch.distributed.reduce_scatter_tensor instead.
  warnings.warn(

Tested with pt-2.0-rc and pt-1.13

@tjruwase

stas00 avatar Mar 14 '23 21:03 stas00

@stas00, is this still needed now that #3021 is merged? Thanks.

tjruwase avatar Mar 15 '23 11:03 tjruwase

of course - the 2 PRs are orthogonal to each other.

  • recent pytorch introduced deprecations and created 2 new APIs, so this current PR switches to using those.
  • the PR that got merged simplifies the handing of warnings that needed to happen once.

stas00 avatar Mar 15 '23 17:03 stas00

Ayo!!! @stas00 https://github.com/microsoft/DeepSpeed/pull/2995

mayank31398 avatar Mar 15 '23 18:03 mayank31398

oh, great minds think alike - apologies I didn't know of your PR, Mayank.

I totally don't care which version is merged. Yours is definitely a prior art, so if it works and the maintainers are happy - merge that one

stas00 avatar Mar 15 '23 18:03 stas00

closing in favor of https://github.com/microsoft/DeepSpeed/pull/2995

jeffra avatar Mar 17 '23 20:03 jeffra