Skip to content

Fix gluon attention example for fp8#10399

Merged
masahi merged 1 commit into
triton-lang:mainfrom
masahi:fix-gluon-attn
May 28, 2026
Merged

Fix gluon attention example for fp8#10399
masahi merged 1 commit into
triton-lang:mainfrom
masahi:fix-gluon-attn

Conversation

@masahi
Copy link
Copy Markdown
Collaborator

@masahi masahi commented May 28, 2026

Currently, running python python/examples/gluon/01-attention-forward.py fails with

python/examples/gluon/01-attention-forward.py:386:14: error: source and result must have the same logical storage size (4096 vs 2048)
    p_tmem = s_tmem._reinterpret(config.dtype, [config.SPLIT_M, 2 * config.BLOCK_N], config.p_tmem_layout)

This happens when the benchmark is run with fp8. pytest python/examples/gluon/01-attention-forward.py doesn't fail simply because it doesn't test on fp8.

The regression is from #10243 but the problematic code hardcoding a fixed column count like config.BLOCK_N // 2 has been there for a long time. Previously it only worked due to the loose convention on reinterpret.

@masahi masahi requested a review from ptillet as a code owner May 28, 2026 00:00
@masahi masahi requested review from Mogball and lezcano and removed request for ptillet May 28, 2026 00:00
@masahi masahi merged commit 6650ee3 into triton-lang:main May 28, 2026
10 checks passed
@masahi masahi deleted the fix-gluon-attn branch May 28, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants