Add FP8×INT4 rowwise GEMM for ROCm (f8i4bf16_rowwise) - #502
Open
q10 wants to merge 1 commit into
Open
Conversation
Summary: NOTE: No linked task. Please associate a task with this diff. Adds a ROCm Triton implementation of `mslk::f8i4bf16_rowwise` for FP8 activations and packed INT4 weights while reusing the existing BF16×INT4 kernel. - Defines the operator schema on both CUDA and ROCm so the HIP Python implementation can register reliably. - Specializes the shared kernel with `HAS_X_SCALE`, two BF16 dot operations for FP8-backed inputs, and fused per-row activation scaling. - Adds FP8-specific autotune candidates and pruning while preserving the prior BF16 tuning space. - Validates tensor shapes, dtypes, devices, grouping invariants, and contiguous scale layouts. - Avoids allocating unused split-K workspace for large-M shapes. - Registers the ROCm benchmark implementation and adds a ROCm correctness/dispatch regression test. Upstream PR: meta-pytorch#495 Reviewed By: jwfromm Differential Revision: D116965755
|
@q10 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D116965755. |
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.
Summary:
NOTE: No linked task. Please associate a task with this diff.
Adds a ROCm Triton implementation of
mslk::f8i4bf16_rowwisefor FP8 activations and packed INT4 weights while reusing the existing BF16×INT4 kernel.HAS_X_SCALE, two BF16 dot operations for FP8-backed inputs, and fused per-row activation scaling.Upstream PR: #495
Reviewed By: jwfromm
Differential Revision: D116965755