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

[Common] Moved framework agnostic THD kernels to common. #1339

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mgoldfarb-nvidia
Copy link
Collaborator

Description

Moves several kernels that are used for context parallelism + THD fused attention to shared location so they can be called by Jax and other frameworks.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • 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

Moves common code out of pytorch filder.

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

@mgoldfarb-nvidia mgoldfarb-nvidia force-pushed the mgoldfarb/move_thd_fused_attn_utils_to_common branch from 94a75ac to 81718ac Compare November 15, 2024 22:12
@mgoldfarb-nvidia mgoldfarb-nvidia force-pushed the mgoldfarb/move_thd_fused_attn_utils_to_common branch 4 times, most recently from 685ad1b to 3ee113e Compare November 15, 2024 23:09
@phu0ngng
Copy link
Collaborator

/te-ci pytorch

Copy link
Collaborator

@xrennvidia xrennvidia left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

Please make sure PyTorch CP tests (L1 tests) passed. Thanks.

transformer_engine/common/fused_attn/thd_utils.h Outdated Show resolved Hide resolved
@mgoldfarb-nvidia mgoldfarb-nvidia force-pushed the mgoldfarb/move_thd_fused_attn_utils_to_common branch from 17eca08 to 6308a03 Compare November 18, 2024 20:21
@mgoldfarb-nvidia
Copy link
Collaborator Author

/te-ci pytorch

@mgoldfarb-nvidia
Copy link
Collaborator Author

/te-ci pytorch L1

@xrennvidia
Copy link
Collaborator

FYI, it seems like pipeline 20535774 failed, not sure why it shows it completed successfully.

@zlsh80826
Copy link
Collaborator

Probably needs to add thd_utils.cu to the CMakeLists.txt here.

@mgoldfarb-nvidia mgoldfarb-nvidia force-pushed the mgoldfarb/move_thd_fused_attn_utils_to_common branch 2 times, most recently from 71bd3cb to 940fd65 Compare November 21, 2024 15:03
@mgoldfarb-nvidia
Copy link
Collaborator Author

/te-ci pytorch L1

Signed-off-by: Michael Goldfarb <mgoldfarb@nvidia.com>
@mgoldfarb-nvidia mgoldfarb-nvidia force-pushed the mgoldfarb/move_thd_fused_attn_utils_to_common branch from 03b0400 to 89fcca9 Compare November 22, 2024 15:15
Signed-off-by: Michael Goldfarb <mgoldfarb@nvidia.com>
@mgoldfarb-nvidia
Copy link
Collaborator Author

/te-ci pytorch L1

@@ -70,6 +70,7 @@ jobs:
run: pip install . -v
env:
NVTE_FRAMEWORK: jax
MAX_JOBS: 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Signed-off-by: Michael Goldfarb <mgoldfarb@nvidia.com>
@mgoldfarb-nvidia
Copy link
Collaborator Author

/te-ci pytorch L1

Copy link
Collaborator

@xrennvidia xrennvidia left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants