Skip to content

[PyTorch] Rename and clean up MXFP8 recipe class - #1445

Closed
timmoon10 wants to merge 5 commits into
NVIDIA:release_v2.0from
timmoon10:rename-mxfp8-recipe
Closed

timmoon10 wants to merge 5 commits into
NVIDIA:release_v2.0from
timmoon10:rename-mxfp8-recipe

Conversation

@timmoon10

@timmoon10 timmoon10 commented Jan 31, 2025 •

Copy link
Copy Markdown
Member

Description

#1442 changed BlockScaling to MXFP8BlockScaling, a big improvement since a certain other 1x128 block scaling recipe has been in the news. That said, it is still a redundant name since MXFP8 will never not use block scaling. This PR changes the name to MXFP8Recipe and makes several other non-functional quality-of-life improvements.

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

  • Rename MXFP8BlockScaling to MXFP8Recipe and MXFP8BlockScalingRecipeState to MXFP8RecipeState
  • Rename recipe type checkers to is_delayed_scaling and is_mxfp8 to make it more obvious they are boolean
  • Make is_delayed_scaling and is_mxfp8 class variables instead of functions
  • Use is_delayed_scaling instead of is_mxfp8 when dealing with delayed scaling logic

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

Rename to MXFP8Recipe. Change accessor to `is_mxfp8`. Specifically check for delayed scaling recipe when handling delayed scaling logic.

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
Copy Markdown
Member Author

Pipeline 23277614

Signed-off-by: Tim Moon <tmoon@nvidia.com>
@timmoon10
timmoon10 marked this pull request as draft February 1, 2025 01:26
@ptrendx ptrendx removed the 2.0.0 label Feb 5, 2025
@timmoon10 timmoon10 closed this Feb 25, 2025
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.

2 participants