Fix CK FP8 grouped GEMM dtype gating for columnwise operands#594
Draft
aris134 wants to merge 5 commits into
Draft
Fix CK FP8 grouped GEMM dtype gating for columnwise operands#594aris134 wants to merge 5 commits into
aris134 wants to merge 5 commits into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
E2E Qwen benchmarking initially suggested that multi-stream hipBLASLt grouped GEMM was outperforming CK FP8 grouped GEMM. Further investigation showed that the CK backend was incorrectly rejecting certain FP8 WGRAD GEMMs due to dtype gating using raw tensor storage rather than the effective canonicalized operand (e.g. columnwise FP8 data used in delayed scaling backward paths). This caused unintended fallback to hipBLASLt grouped GEMM in affected cases.
This commit fixes the FP8 grouped GEMM dtype gating logic to use the effective operand dtype after canonicalization, eliminating erroneous fallback for columnwise FP8 operands. Additionally, this commit introduces simple shape specialization heuristics based on N/K sizes for CK Tile FP8 grouped GEMM dispatch.
After applying the dtype gating fix, rerunning the benchmark sweep (see https://github.com/ROCm/frameworks-internal/issues/16708#issuecomment-4504614857) with fallback warnings enabled (NVTE_CUTLASS_GROUPED_GEMM_WARN_FALLBACK=1) produced no grouped GEMM fallback warnings in the tested CK FP8 paths.
Benchmark results and benchmarking script found here: https://github.com/ROCm/frameworks-internal/issues/16708#issuecomment-4504614857
Fixes # (16708)
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: