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

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

Draft
wants to merge 5 commits into
base: release_v2.0
Choose a base branch
from

Conversation

timmoon10
Copy link
Collaborator

@timmoon10 timmoon10 commented Jan 31, 2025

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 <[email protected]>
@timmoon10
Copy link
Collaborator Author

Pipeline 23277614

Signed-off-by: Tim Moon <[email protected]>
@timmoon10 timmoon10 marked this pull request as draft February 1, 2025 01:26
@ptrendx ptrendx removed the 2.0.0 label Feb 5, 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