Skip to content

Add gfx1151 flash tuning database for hdim=64, fp16/bf16#194

Open
amd-callumm wants to merge 1 commit into
ROCm:mainfrom
amd-callumm:gfx1151_tuning_db
Open

Add gfx1151 flash tuning database for hdim=64, fp16/bf16#194
amd-callumm wants to merge 1 commit into
ROCm:mainfrom
amd-callumm:gfx1151_tuning_db

Conversation

@amd-callumm

@amd-callumm amd-callumm commented Jul 9, 2026

Copy link
Copy Markdown

Motivation

Start tuning flash attention on gfx1151 for performance.

For now, only head dim 64 and 16-bit data types are included. I intend to do broader/more complete runs, but they will take a while, so in the meantime, this covers some desirable use cases.

Technical Details

Tuning database coverage:

  • Head dimension: 64
  • Sequence lengths: all Q × K combos where Q,K ∈ {16, 32, 64, 128, 256, 512, 1024, 2048}
  • Data types: float16, bfloat16
  • Attention modes: causal and non-causal
  • Bias types: (0, 1)

Performance improvements (attn_fwd kernel vs. default):

  • Average speedup: 14.7%
  • Range: -1.7% to 53.5%
  • Best improvements: large shapes with bias (2048×1024: 53.5%, 2048×512: 37.5%)

Test Plan

Build and run tuning test libraries and run level 0 and 1 test suites

Test Result

Level 1 tests: 14,712 tests skipped (hdim > 256)

All other tests passed.

Tuning database coverage:
  - Head dimension: 64
  - Sequence lengths: all Q × K combos where Q,K ∈ {16, 32, 64, 128, 256, 512, 1024, 2048}
  - Data types: float16, bfloat16
  - Attention modes: causal and non-causal
  - Bias types: (0, 1)

Performance improvements (attn_fwd kernel vs. default):
  - Average speedup: 14.7%
  - Range: -1.7% to 53.5%
  - Best improvements: large shapes with bias (2048×1024: 53.5%, 2048×512: 37.5%)

Validation:
  - Build and run tuning test libraries at levels 0 and 1
  - Level 1: 14,712 tests skipped (hdim > 256)
  - All other tests passed
@xinyazhang

Copy link
Copy Markdown
Collaborator

We're modularizing AOTriton's flash-attention code/data/etc. into modules/flash/* (tracked in PRs #195#199); please hold off on structural changes to v3src/, modules/, or python/test until this stack lands to avoid merge conflicts.

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