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] Generalized MXFP8 fused kernels w.r.t. input tensor dimensions #1437

Open
wants to merge 10 commits into
base: release_v2.0
Choose a base branch
from

Conversation

Oleg-Goncharov
Copy link
Collaborator

Description

Lifted restrictions on input tensor dimensions in MXFP8 fused kernels, allowing arbitrary number of rows (or the product of all tensor dimensions except the last of high-dimensional tensors).
The number of columns (or the dimensionality of the last dimension of high-dimensional tensors) must satisfy the memory alignment requirement for Tensor Memory Accelerator (TMA) to be a multiple of 16 bytes.

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

  • Removed the isFullTile requirement in the mxfp8_quantize function

  • Added 16-byte alignment check when creating a TMA descriptor

  • MXFP8 Test Suite: Added the alignment/padding requirement for dimensions of the tensors with scaling factors to be multiples of [128,4] for row-wise and [4,128] for column-wise scaling.

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

@Oleg-Goncharov Oleg-Goncharov added enhancement New feature or request 2.0.0 labels Jan 29, 2025
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.

Mostly LGTM. It looks like this is needed before we can merge #1435.

tests/cpp/operator/test_cast_mxfp8.cu Outdated Show resolved Hide resolved
transformer_engine/common/common.cu Outdated Show resolved Hide resolved
@timmoon10
Copy link
Collaborator

timmoon10 commented Jan 31, 2025

Pipeline 23264050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0.0 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants