TransformerEngine icon indicating copy to clipboard operation
TransformerEngine copied to clipboard

Dgrad ReduceScatter overlap fix

Open vasunvidia opened this issue 1 year ago • 1 comments

Description

Please include a brief summary of the changes, relevant motivation and context.

This PR fixes 2 bugs in enabling DGRAD-RS overlap.

Type of change

  • [ ] Documentation change (change only to the documentation, either a fix or a new content)
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Infra/Build change
  • [ ] Code refractor

Changes

Please list the changes introduced in this PR:

  • Fix a bug which assumes DGRAD-RS overlap always uses pipeline method. The fix is to use TP config to add the layer to the correct method list.
  • ring_exchange RS uses main_stream for last GEMM chunk. But the send/recv streams wait for stream_compute during last chunk. The fix is to use stream_compute for last chunk and use main stream for reduction kernel.

Checklist:

  • [ ] I have read and followed the contributing guidelines
  • [ ] The functionality is complete
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes

vasunvidia avatar Aug 07 '24 20:08 vasunvidia

/te-ci pytorch

timmoon10 avatar Aug 08 '24 18:08 timmoon10

Could you resolve the conflicts? @vasunvidia

ksivaman avatar Aug 12 '24 21:08 ksivaman

/te-ci pytorch

ksivaman avatar Aug 12 '24 22:08 ksivaman