TransformerEngine
TransformerEngine copied to clipboard
Dgrad ReduceScatter overlap fix
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
/te-ci pytorch
Could you resolve the conflicts? @vasunvidia
/te-ci pytorch