-
-
Notifications
You must be signed in to change notification settings - Fork 12k
[Feature] Refactor batch invariant fp8 DeepGEMM #27606
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
Conversation
Signed-off-by: yewentao256 <[email protected]>
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.
Code Review
This pull request refactors the apply method in Fp8LinearMethod to simplify the logic for batch-invariant FP8 GEMM. The change reuses W8A8BlockFp8LinearOp for block-quantized weights, aligning the batch-invariant path with the non-batch-invariant path and replacing a dequantization fallback with a more performant quantized kernel path. While this is a good simplification, I've identified a potential issue related to the removal of a safety check for handling weight scales of square matrices, which could lead to incorrect behavior in some edge cases.
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: yewentao256 <[email protected]>
|
This PR could also fix #28249 |
Signed-off-by: yewentao256 <[email protected]> Signed-off-by: xuebwang-amd <[email protected]>
Signed-off-by: yewentao256 <[email protected]>
Signed-off-by: yewentao256 <[email protected]> (cherry picked from commit 35d801f)
Signed-off-by: yewentao256 <[email protected]>
Purpose
Fixes #27127 (comment) @mgoin
We can reuse the code from fp8_utils to simplify the logic