-
Notifications
You must be signed in to change notification settings - Fork 294
ROCm mx-fp8 Gemm #2066
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
Open
petrex
wants to merge
18
commits into
pytorch:main
Choose a base branch
from
petrex:rocm_mx_gemm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+87
−5
Open
ROCm mx-fp8 Gemm #2066
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c21d24c
Enhance MX formats to support HIPBLASLT kernel choice and update vali…
petrex 36dd5b7
Update README.md to include support for AMD MI355x hardware and HIPBL…
petrex c75df8e
lint
petrex 9b7b602
Merge branch 'main' into rocm_mx_gemm
petrex 5ee124e
Merge branch 'main' into rocm_mx_gemm
petrex df2c220
lint
petrex 8df1d85
Merge branch 'main' into rocm_mx_gemm
petrex 8ae4021
Update HIPBLASLT comment in config.py and adjust assertion in mx_ops.…
petrex 8505860
lint
petrex 129a6d6
lint
petrex c807d70
Update assertion message in mx_ops.py to clarify that both CUBLAS and…
petrex 75db95e
Refactor assertion in mx_ops.py to improve clarity on supported kerne…
petrex 3ecc91e
Update torchao/prototype/mx_formats/config.py
petrex ef52979
Add ROCm MX support check and implement HIPBLASLT FP8 test
petrex f88f1cf
add space
petrex 5d2b55d
Refactor SQNR calculation in HIPBLASLT FP8 test
petrex 979893a
Enhance ROCm MX support check in `is_ROCm_mx_supported` function
petrex 012f938
Refactor `is_ROCm_mx_supported` function for improved readability
petrex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change this to
SCALED_MM
cc @vkuzo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify your approach here? I believe
scale_mm
also has a CUDA path—unless you have a different plan in mind? Happy to align with your direction; just let me know.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh I just mean that if I want to quantize a model to mxfp8 I need to know if I am running on rocm or cuda. And the only place where one needs to know this is here. But in reality the "CUBLAS" enum really means "call into scaled_mm" and that would handle all the dispatch logic.
It feels weird and anti-pattern to core pytorch to have device specific(cuda/ROCM) APIs when we dont need to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, IMO for what this PR is trying to do we should rename
MXGemmKernelChoice.CUBLAS
toMXGemmKernelChoice.SCALED_MM
, and in a future PR we should probably deleteMXGemmKernelChoice
- it was for debugging in early days.