[examples] Add FlashKDA as a second baseline for kda_varlen - #3291
Draft
tarinduj wants to merge 1 commit into
Draft
[examples] Add FlashKDA as a second baseline for kda_varlen#3291tarinduj wants to merge 1 commit into
tarinduj wants to merge 1 commit into
Conversation
tarinduj
added a commit
that referenced
this pull request
Aug 5, 2026
[FlashKDA](https://github.com/MoonshotAI/FlashKDA) implements the same KDA forward as `kda_varlen`. Benchmarking it on the same shapes gives the dashboard a `flashkda_speedup` column next to `helion_speedup`, both measured against FLA. ## What's here - **`examples/linear/linear_attention_flashkda.py`** and `harness.flashkda_fwd`, wiring FlashKDA in as a second baseline for `kda_varlen`. - **`flashkda_latency_ms` and `flashkda_speedup`** in `benchmarks/run_linattn.py`. - **The install in `benchmark.yml`**, beside FLA's. It is forward-only, takes its inputs token-major and pre-activation, and is compiled for `D == DV == 128`. ## Benchmarks `%FLA = 100 * fla_ms / row_ms` on H100, autotuned with `HELION_AUTOTUNE_EFFORT=full`. **Higher is faster than FLA.** | variant | fixed_T8192_H96_D128 | fixed_T8192_H64_D128 | ragged_T8192_H96_D128 | ragged_T8192_H64_D128 | uniform_T8192_H96_D128 | uniform_T8192_H64_D128 | |---|---|---|---|---|---|---| | kda_varlen | 100% | 91% | 95% | 90% | 99% | 91% | | flash_kda | 232% | 183% | 229% | 217% | 257% | 259% | So FlashKDA is about 2.2x ahead of us. It is written in CuTe, and these numbers are Helion on the Triton backend, so the next thing to try is `HELION_BACKEND=cute`. stack-info: PR: #3291, branch: tarinduj/stack/5
tarinduj
force-pushed
the
tarinduj/stack/5
branch
from
August 5, 2026 22:34
5502742 to
2302279
Compare
tarinduj
force-pushed
the
tarinduj/stack/4
branch
from
August 5, 2026 22:34
2b0cbf7 to
9f52f0c
Compare
This was referenced Aug 5, 2026
[FlashKDA](https://github.com/MoonshotAI/FlashKDA) implements the same KDA forward as `kda_varlen`. Benchmarking it on the same shapes gives the dashboard a `flashkda_speedup` column next to `helion_speedup`, both measured against FLA. ## What's here - **`examples/linear/linear_attention_flashkda.py`** and `harness.flashkda_fwd`, wiring FlashKDA in as a second baseline for `kda_varlen`. - **`flashkda_latency_ms` and `flashkda_speedup`** in `benchmarks/run_linattn.py`. - **The install in `benchmark.yml`**, beside FLA's. It is forward-only, takes its inputs token-major and pre-activation, and is compiled for `D == DV == 128`. ## Benchmarks `%FLA = 100 * fla_ms / row_ms` on H100, autotuned with `HELION_AUTOTUNE_EFFORT=full`. **Higher is faster than FLA.** | variant | fixed_T8192_H96_D128 | fixed_T8192_H64_D128 | ragged_T8192_H96_D128 | ragged_T8192_H64_D128 | uniform_T8192_H96_D128 | uniform_T8192_H64_D128 | |---|---|---|---|---|---|---| | kda_varlen | 100% | 91% | 95% | 90% | 99% | 91% | | flash_kda | 232% | 183% | 229% | 217% | 257% | 259% | So FlashKDA is about 2.2x ahead of us. It is written in CuTe, and these numbers are Helion on the Triton backend, so the next thing to try is `HELION_BACKEND=cute`. stack-info: PR: #3291, branch: tarinduj/stack/5
tarinduj
force-pushed
the
tarinduj/stack/5
branch
from
August 5, 2026 22:37
2302279 to
78c53cc
Compare
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.
Stacked PRs:
[examples] Add FlashKDA as a second baseline for kda_varlen
FlashKDA implements the same KDA forward as
kda_varlen. Benchmarking it on the same shapes gives the dashboard aflashkda_speedupcolumn next tohelion_speedup, both measured against FLA.What's here
examples/linear/linear_attention_flashkda.pyandharness.flashkda_fwd, wiring FlashKDA in as a second baseline forkda_varlen.flashkda_latency_msandflashkda_speedupinbenchmarks/run_linattn.py.benchmark.yml, beside FLA's.It is forward-only, takes its inputs token-major and pre-activation, and is compiled for
D == DV == 128.Benchmarks
%FLA = 100 * fla_ms / row_mson H100, autotuned withHELION_AUTOTUNE_EFFORT=full. Higher is faster than FLA.So FlashKDA is about 2.2x ahead of us. It is written in CuTe, and these numbers are
Helion on the Triton backend, so the next thing to try is
HELION_BACKEND=cute.