Skip to content

Comments

MXFP8 support in Userbuffers#1711

Merged
ptrendx merged 55 commits intoNVIDIA:mainfrom
timmoon10:mxfp8-ub-debug
May 7, 2025
Merged

MXFP8 support in Userbuffers#1711
ptrendx merged 55 commits intoNVIDIA:mainfrom
timmoon10:mxfp8-ub-debug

Conversation

@timmoon10
Copy link
Collaborator

@timmoon10 timmoon10 commented Apr 22, 2025

Description

This PR adds basic support for overlapped tensor-parallel communication with MXFP8 data, with the following limitations:

  • Tensor dimensions must be multiples of 128
  • MXFP8 scaling factors are communicated with blocking NCCL collectives
  • The wgrad GEMM + grad output AG case is not supported.

In the process, I've done some significant refactoring:

  • Removed quantized tensor logic from the Userbuffers communicators, so they only take responsibility for the Userbuffers buffer itself.
  • Added helper functions to expose the Userbuffers buffer as a quantized tensor and handle scaling factors
  • Restore support for Userbuffers in te.Sequential
  • Reorganize module implementation for clarity

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 refactoring

Changes

  • Add MXFP8 support in Userbuffers
  • Move Userbuffers logic for quantized tensors out of UB communicator and into helper functions
  • Restore Userbuffers support in te.Sequential

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

Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
…tion

Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
dgrad GEMM + dx RS is still broken.

Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Still failing with dy AG + wgrad GEMM

Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
@timmoon10 timmoon10 added the enhancement New feature or request label Apr 22, 2025
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
@timmoon10
Copy link
Collaborator Author

/te-ci pytorch L1

denera
denera previously approved these changes Apr 29, 2025
Copy link
Collaborator

@denera denera left a comment

Choose a reason for hiding this comment

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

LGTM

timmoon10 added 2 commits May 1, 2025 18:59
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
@timmoon10
Copy link
Collaborator Author

/te-ci L1

@timmoon10
Copy link
Collaborator Author

/te-ci pytorch L1

timmoon10 and others added 5 commits May 6, 2025 21:54
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Signed-off-by: Tim Moon <tmoon@nvidia.com>
@timmoon10
Copy link
Collaborator Author

/te-ci pytorch L1

Signed-off-by: Tim Moon <tmoon@nvidia.com>
@timmoon10
Copy link
Collaborator Author

/te-ci pytorch L1

timmoon10 and others added 2 commits May 7, 2025 07:35
Signed-off-by: Tim Moon <tmoon@nvidia.com>
@timmoon10
Copy link
Collaborator Author

/te-ci pytorch L1

Copy link
Member

@ptrendx ptrendx left a comment

Choose a reason for hiding this comment

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

LGTM

@ptrendx ptrendx merged commit ce0b46c into NVIDIA:main May 7, 2025
17 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants