Skip to content

[kimi k3] Allow Attention Gym KDA on CUDA capability 9.0+ - #4868

Merged
tianyu-l merged 1 commit into
pytorch:mainfrom
JavaZeroo:kimi-k3-kda-sm90
Sep 25, 2026
Merged

tianyu-l merged 1 commit into
pytorch:mainfrom
JavaZeroo:kimi-k3-kda-sm90

Conversation

@JavaZeroo

Copy link
Copy Markdown
Contributor

Currently, KDAKernel only accept SM100/SM103, so Kimi K3 and its KDA tests only run on B200-class GPUs. This gate is stale:

K3's real hardware floor is the fused bounded gate (bound_gate(impl="fused")), which needs TMA, i.e. CUDA capability 9.0+.

Changes

  • KDAKernel: require CUDA capability >= 9.0 instead of exactly SM100/SM103.
  • test_kda_attention.py, test_kimi_k3.py: relax the KDA skip conditions to match.
  • Kimi K3 README: document the hardware requirement.

SM100/SM103 behavior is unchanged

KDAKernel only accepted SM100/SM103. That gate matched attn-gym 0.0.5,
pinned when pytorch#4351 moved KDA onto Attention Gym. Since 0.0.7, chunk_kda
runs CuTe kernels on SM100/SM103 and Triton kernels on other NVIDIA
GPUs, and the pinned 0.0.13 keeps that dispatch. The remaining hardware
floor is the fused bounded gate, which needs TMA (SM90+).

- Relax the KDAKernel gate and the two KDA GPU test skips to >= (9, 0).
- Document the hardware requirement in the Kimi K3 README.
@pytorch-bot pytorch-bot Bot added the ciflow/fake-pg Run 1-GPU Fake PG integration tests label Sep 24, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 24, 2026
@pytorch-bot

pytorch-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@tianyu-l
tianyu-l requested a review from drisspg September 24, 2026 20:32

@drisspg drisspg left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; should also work on A100+, but havent tested directly

@JavaZeroo

JavaZeroo commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Looks good; should also work on A100+, but havent tested directly

yes, I just tested on rtx5080 only.

@QIU023

QIU023 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Yes, A100 and RTX5060Ti also works actually, I have ran on all these, as long as the eager impl in AttnGym is available

@tianyu-l
tianyu-l merged commit 4f97e90 into pytorch:main Sep 25, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/fake-pg Run 1-GPU Fake PG integration tests CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants