CK Tile FMHA/batch-prefill: support BF16/FP16 Q with FP8 KV for GQA decode
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
Start by tracing CK Tile's mha_batch_prefill_func and the BF16 query specialization, then compare it with AITER's paged_attention_ragged mixed-dtype path and the all-FP8 probe. Verify BF16/FP16 Q with FP8 K/V descales, BF16/FP16 output, GQA ratio 12, q_len=1, and paged metadata; done means the requested contract compiles and runs for the stated GLM-shaped case.
索引モデルが issue の本文から書いたものです。
説明
Request
Please add CK Tile FMHA / batch-prefill support for the serving-friendly mixed-dtype GQA attention contract:
Q: BF16 or FP16K/V cache: FP8 E4M3, with descalesO: BF16 or FP16- GQA: arbitrary
num_q_heads / num_kv_headsratios, including12 - Head dim:
128 - Decode-like use cases:
q_len=1, paged/batch-prefill metadata, context length 1K+
Motivation
We are serving GLM-4.5-Air FP8 on AMD MI300X (gfx942) through SGLang/AITER. The model is non-MLA GQA:
num_attention_heads=96num_key_value_heads=8head_dim=128- GQA ratio:
12
The desired decode path is BF16/FP16 activation Q with FP8 KV cache. The model weights and KV cache are FP8, but the inter-layer activation / attention Q remains BF16 or FP16 in the serving stack. Quantizing Q to FP8 just to call attention adds extra overhead and an additional accuracy/perf tuning surface.
Current behavior observed
On MI300X (gfx942), AITER paged_attention_ragged supports this mixed contract:
- BF16 Q/O
- FP8 K/V cache
gqa_ratio=12head_size=128- page/block size
1
It compiles a paged-attention specialization with kv_dtype=uint8_t and fp8_kv_dtype=fp8_e4m3.
CK Tile mha_batch_prefill_func currently supports the same GLM GQA shape if Q/K/V are all FP8. For example, a probe with batch 4, q_len=1, ctx=1024, num_q_heads=96, num_kv_heads=8, head_dim=128, all FP8 Q/K/V, BF16 output compiled:
mha_batch_prefill_fp8bf16_nlogits_nbias_nmask_nlse_ndropout_pertensor
The same probe with BF16 Q and FP8 K/V fails after compiling a BF16 query path:
mha_batch_prefill_bf16_nlogits_nbias_nmask_nlse_ndropout_nqscale
RuntimeError: query and key must have the same dtype
Desired support
Please support CK Tile FMHA / batch-prefill for:
- BF16/FP16 Q with FP8 K/V
- BF16/FP16 output
- K/V descales
- arbitrary GQA ratios such as
12 - decode-style
q_len=1and paged/batch-prefill metadata
This would let AITER/SGLang use CK Tile for GLM-style FP8 KV cache decode without adding an explicit Q quantization path before attention.
- 主要言語
- C++
- スター
- 552
- フォーク
- 316
- 平均マージ
- 3日 14時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ROCm/composable_kernel のほかの issue
-
[ck_tile] FastGeluAsm::operator()<float, float> returns wrong results from -O1 up: inline-asm scratch operand lacks earlyclobber対応中かも @francois141 が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ROCm/composable_kernel#3763 ·
-
[ck_tile][FMHA] fp8 forward returns incorrect results for head dims not divisible by 16 (gfx950)オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
ROCm/composable_kernel#3796 ·
-
Tracking issue for #3792: relu2 CK XDL 2-stage MoE GEMM fix stalled on review対応中かも @shantipriya-amd が 19 日前に担当しました。 オープン
ROCm/composable_kernel#3794 · 担当者 1 名 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
ROCm/composable_kernel#3781 · コメント 1 件 ·
-
[CK Tile] 8-wave ABQuant silently returns wrong results when BQuantGroupSize::kN < WarpGemm::kNオープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
ROCm/composable_kernel#3771 · コメント 1 件 ·
ROCm/composable_kernel の issue をすべて見る
似ている issue
-
bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
difficulty:easy func:gui prio:normal type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NatronGitHub/Natron#2118 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
bug difficulty:easy prio:low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NatronGitHub/openfx-io#523 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
ArduPilot/ardupilot_gazebo#195 ·