Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atomic gemm for TP-AR and TP-RS overlap with P2P exchanges #732

Merged
merged 6 commits into from
Apr 3, 2024

Conversation

erhoo82
Copy link
Collaborator

@erhoo82 erhoo82 commented Mar 23, 2024

  • Atomic GEMM for TP-AG and TP-RS overlaps with P2P ring-exchanges
  • TP-AG overlap shuffles GEMM chunk outputs and TP-RS overlap re-shuffles. So, both TP-AG and TP-RS should use atomic GEMM and ring_exhcnage for functionality.
  • NVTE_AG_P2P_MULTI_ATOMIC=1 uses a single kernel for TP-AG.
  • Updated the assert conditions of userbuffer initialization.
  • Update the default value of num_splits to 4 from 0, which is only valid for TP-RS overlap with pipeline overlap.

Signed-off-by: Sangkug Lym <slym@nvidia.com>
@erhoo82
Copy link
Collaborator Author

erhoo82 commented Mar 25, 2024

@timmoon10
Can you trigger a ci test?

@timmoon10
Copy link
Collaborator

/te-ci pytorch

Copy link
Collaborator

@timmoon10 timmoon10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the tests pass.

transformer_engine/pytorch/module/base.py Outdated Show resolved Hide resolved
Signed-off-by: Sangkug Lym <slym@nvidia.com>
@erhoo82
Copy link
Collaborator Author

erhoo82 commented Mar 28, 2024

Fixed lint errors and reflected comments.
@timmoon10 Please trigger ci.

@erhoo82
Copy link
Collaborator Author

erhoo82 commented Apr 1, 2024

@timmoon10 Can we merge this PR?

@ksivaman
Copy link
Member

ksivaman commented Apr 1, 2024

/te-ci pytorch

@ksivaman ksivaman added the 1.6.0 label Apr 3, 2024
ksivaman added 3 commits April 2, 2024 19:26
Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
@ksivaman
Copy link
Member

ksivaman commented Apr 3, 2024

/te-ci pytorch

@ksivaman ksivaman merged commit 180de05 into NVIDIA:main Apr 3, 2024
9 of 10 checks passed
pggPL pushed a commit to pggPL/TransformerEngine that referenced this pull request May 15, 2024
* Atomic gemm for TP-AR and TP-RS overlap with P2P exchanges

Signed-off-by: Sangkug Lym <slym@nvidia.com>

* FP8 reduction for atomic TP-RS with p2p exchange

Signed-off-by: Sangkug Lym <slym@nvidia.com>

* Fix

Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>

---------

Signed-off-by: Sangkug Lym <slym@nvidia.com>
Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
Co-authored-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
pggPL pushed a commit to pggPL/TransformerEngine that referenced this pull request May 23, 2024
* Atomic gemm for TP-AR and TP-RS overlap with P2P exchanges

Signed-off-by: Sangkug Lym <slym@nvidia.com>

* FP8 reduction for atomic TP-RS with p2p exchange

Signed-off-by: Sangkug Lym <slym@nvidia.com>

* Fix

Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>

---------

Signed-off-by: Sangkug Lym <slym@nvidia.com>
Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
Co-authored-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants