Repository navigation
[TRITON]: Add fused GEMMs to optimize FF block - #736
Merged
Merged
Conversation
rahulbatra85
reviewed
Aug 1, 2025
rahulbatra85
requested changes
Aug 1, 2025
rahulbatra85
left a comment
Contributor
There was a problem hiding this comment.
Please add logging for the new op
rahulbatra85
approved these changes
Aug 2, 2025
4 tasks done
valarLip
pushed a commit
that referenced
this pull request
Mar 18, 2026
* Add optional fused activation + gating args to a16w16 GEMM * Add tests for fused a16w16 GEMM * Formatting changes * Add gating & activation tests for fused a16w16 GEMM * Factor out fused GEMM kernel into separate file * Revert testing tolerances to not affect CI * Update a16w16 gated GEMM tests * Factor out FF block function into separate file + write tests + benchmarks * Add tests for full FF interface * Formatting changes * Update fused-act-gate a16w16 benchmark * Fix shape error for FF interface when y is not provided * Add tests for ungated FF function * Tune a16w16 performance for standard & gated GEMMs * Remove FF interface (will refactor for next PR) * Add mi300x tuning configs for A16W16 & Gated A16W16 GEMMs * Fix error with DS config under new config format * Restore config to previously tuned variables * Add logging to a16w16 gated GEMM
klin-amd
added a commit
that referenced
this pull request
Oct 20, 2026
Add the ROUND_BEFORE_ACT constexpr. The wrapper sets it only on gfx1151, the arch where the change was measured. The original activation path was benchmarked on gfx942 and gfx950 (#736). With ROUND_BEFORE_ACT=False, the kernel compiles to the same instructions as before on gfx942, gfx950 and gfx1100. Co-Authored-By: Claude <[email protected]>
3 of 6 tasks
menglcai-amd
pushed a commit
that referenced
this pull request
Nov 10, 2026
Add the ROUND_BEFORE_ACT constexpr. The wrapper sets it only on gfx1151, the arch where the change was measured. The original activation path was benchmarked on gfx942 and gfx950 (#736). With ROUND_BEFORE_ACT=False, the kernel compiles to the same instructions as before on gfx942, gfx950 and gfx1100. Co-Authored-By: Claude <[email protected]>
menglcai-amd
pushed a commit
that referenced
this pull request
Nov 22, 2026
Add the ROUND_BEFORE_ACT constexpr. The wrapper sets it only on gfx1151, the arch where the change was measured. The original activation path was benchmarked on gfx942 and gfx950 (#736). With ROUND_BEFORE_ACT=False, the kernel compiles to the same instructions as before on gfx942, gfx950 and gfx1100. Co-Authored-By: Claude <[email protected]>
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.
Adding fused GEMM + activation + gating options to reduce memory movement overhead in a FF block.
Changes:
activationstring parameter support forgemm_a16w16to fuse an activation function with the GEMM.gemm_a16w16_gating.pywhich uses the first half of the (M, N) output along the N dimension as the gating activations and the second half as the layer activations. Produces a tensor of shape (M, N//2). This also includes anactivationparameter for the gating activation.Write a fully-fused E2E FF kernel.Will go into next PR.Benchmarks on 350x:

Post-tuning:

Benchmarks on 300x:

Multikernel-ff is where we're at right now (e.g launching two Aiter Triton GEMMs).