Skip to content

[Triton/Gluon] [Feature] MHA: add out_dtype to the Triton forward entry point - #7232

Merged
phambinhfin merged 4 commits into
ROCm:mainfrom
phambinhfin:phambinh/triton-mha-out-dtype
Nov 6, 2026
Merged

phambinhfin merged 4 commits into
ROCm:mainfrom
phambinhfin:phambinh/triton-mha-out-dtype

Conversation

@phambinhfin

@phambinhfin phambinhfin commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

_flash_attn_forward is the forward entry point of the Triton MHA backend. For FP8 inputs, it always allocates a float32 output. For other inputs, the output has the dtype of q. A caller that needs a bfloat16 output from FP8 inputs must cast the float32 output after the call. This cast is one more kernel launch, and the float32 buffer is two times the size of the bfloat16 output.

The draft FP8 prefill path for ROCm in vLLM (vllm-project/vllm#62913) calls _flash_attn_forward with FP8 inputs and needs a bfloat16 output.

Technical Details

  • _flash_attn_forward gets a new argument, out_dtype: torch.dtype | None = None. It sets the dtype of the output tensor.
  • None keeps the current dtype: float32 for FP8 inputs, q.dtype for other inputs.
  • out_dtype must be float32, bfloat16 or float16. Other dtypes raise ValueError.
  • Without out_dtype, every implementation gets the same output dtype as before. An implementation that requires the output dtype to match q.dtype rejects a different out_dtype before dispatch, with a message that names out_dtype.
  • The kernel accumulates in float32 and casts to the output dtype when it stores the result. A bfloat16 output is equal to the float32 output cast to bfloat16. A float16 output can differ from the cast float32 output by 1 ulp on a few values: in some kernels the backend fuses the 1/l multiply into the conversion (v_fma_mixlo_f16), so the value is rounded once instead of twice.
  • softmax_lse stays float32.
  • The public wrappers (flash_attn_func, flash_attn_varlen_func) and the Gluon backend do not change.

Test Plan

Two new tests in op_tests/triton_tests/attention/test_mha.py:

  • test_mha_forward_out_dtype, 6 cases, one per behavior:

    • FP8 inputs, bfloat16 output, in the shape of the vLLM caller (varlen, causal, head size 256).
    • FP8 inputs, bfloat16 output, batch layout, non-causal.
    • FP8 inputs, float16 output.
    • FP8 inputs, out_dtype=None: the output stays float32.
    • bfloat16 inputs, out_dtype=None: the output stays bfloat16.
    • bfloat16 inputs, float16 output, non-causal: the case where the store fuses the 1/l multiply into the conversion.

    Each case checks the output dtype, checks that softmax_lse is bit-identical to the float32 run, and compares the output with the float32 output cast to the output dtype: at most 1 ulp apart, and at most 1 in 1000 values different.

  • test_mha_forward_out_dtype_rejected, 2 cases: out_dtype=torch.int32 raises ValueError, and out_dtype=torch.float16 with bfloat16 inputs fails before dispatch in the implementation that requires matching dtypes.

python3 -m pytest -v op_tests/triton_tests/attention/test_mha.py -k test_mha_forward_out_dtype
python3 -m pytest -q op_tests/triton_tests/attention/test_mha.py

Also on this PR: the other attention test files that the Triton test selection picks for this change (test_mha_dao_ai.py, test_mha_spatial_swizzle.py, test_mha_with_pe.py, test_mha_with_sink.py).

Test Result

MI325X (gfx942), ROCm 7.2, Triton 3.8.0, torch 2.13.0. Baseline: main bd4ff1c. PR: 59028bd.

Tests main this PR
The two new tests, 8 cases 8 failed (TypeError, no out_dtype argument) 8 passed
All of test_mha.py 1194 passed, 1133 skipped 1202 passed, 1133 skipped
test_mha_dao_ai.py 39 passed 39 passed
test_mha_spatial_swizzle.py 22 passed 22 passed
test_mha_with_pe.py 68 passed, 316 skipped 68 passed, 316 skipped
test_mha_with_sink.py 330 passed, 328 skipped 330 passed, 328 skipped

How exact the narrow output is, measured on this PR over the full grid of these options (a separate script, not part of the test), against the float32 output cast to the output dtype:

  • bfloat16 output: bit-identical in all 16 configurations (FP8 or bfloat16 inputs, batch or varlen, causal or not, head size 128 or 256).
  • float16 output: bit-identical except for bfloat16 inputs with non-causal attention, where 13 of 524,288 values (head size 128) and 35 of 1,048,576 values (head size 256) differ by 1 ulp. The ISA of exactly these four kernels contains v_fma_mixlo_f16.
  • The configuration of the vLLM caller (FP8, varlen with uneven lengths, head size 256, its explicit config): bit-identical for bfloat16 and float16 outputs, causal and non-causal, and softmax_lse is unchanged.

The test fails when the store is wrong: with the store forced to round toward zero, 5 of the 6 cases fail (the other one has a float32 output, so the store does not narrow). With the two out_dtype checks removed, both rejection cases fail.

CI ran the new tests on MI35X (gfx950) and, with the ci:triton-300x label, on MI300X (gfx942). All 8 cases passed on both at 9dd5742; 59028bd only adds assert messages.

PR Self-Review

Reviewed revision

495d3b9

Behavior and intent

_flash_attn_forward gets an optional out_dtype argument that sets the dtype of the output tensor. With None, the output dtype does not change: float32 for FP8 inputs and q.dtype for other inputs. Values outside float32, bfloat16 and float16 are rejected, and where an implementation requires it, out_dtype must equal q.dtype. The kernel casts from its float32 accumulator only when it stores the result. Thus a caller gets a bfloat16 output from FP8 inputs without a cast after the call.

Validation and unverified scope

On MI325X (gfx942), the two new tests: 8 failed on main bd4ff1c (TypeError) and 8 passed on this PR. All of test_mha.py: 1194 passed on main and 1202 passed on this PR, with 1133 skipped on both. The four other selected attention test files have the same results on main and on this PR. gfx950 was not run locally; CI passed all 8 cases on MI35X (gfx950) and on MI300X (gfx942). Whether gfx950 fuses the float16 store the same way was not checked; the test allows it either way. The public wrappers do not take out_dtype, so this PR does not cover them.

PR-specific question

On main, all 8 new cases fail with TypeError: _flash_attn_forward() got an unexpected keyword argument 'out_dtype'. On this PR they pass. The output check fails for a store that does not round to nearest: forced round-toward-zero fails 5 of the 6 output cases. No existing test can cover this, because main has no argument that sets the output dtype. The existing tests use the default dtype, and they pass on both trees.

Changed op tests

op_tests/triton_tests/attention/test_mha.py: adds test_mha_forward_out_dtype (6 cases) and test_mha_forward_out_dtype_rejected (2 cases). They check that out_dtype sets the output dtype, that the output is the float32 output cast to that dtype, that softmax_lse does not change, and that unsupported values are rejected before dispatch. They call _flash_attn_forward directly, because the public wrappers do not take out_dtype. No existing test sets an output dtype.

@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 7232 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

@aiter-bot

aiter-bot commented Oct 30, 2026 •

Copy link
Copy Markdown

NOT READY FOR HUMAN REVIEW

PR Self-Review

Revision 495d3b91e903 · mode shadow

Author self-review accepted. Readiness report:

Author answers

  • PASS — current-SHA answers are present and structurally specific
Show the author's self-review answers

Behavior and intent

`_flash_attn_forward` gets an optional `out_dtype` argument that sets the dtype of the output tensor. With `None`, the output dtype does not change: float32 for FP8 inputs and `q.dtype` for other inputs. Values outside float32, bfloat16 and float16 are rejected, and where an implementation requires it, `out_dtype` must equal `q.dtype`. The kernel casts from its float32 accumulator only when it stores the result. Thus a caller gets a bfloat16 output from FP8 inputs without a cast after the call.

Validation and unverified scope

On MI325X (gfx942), the two new tests: 8 failed on main `bd4ff1c` (`TypeError`) and 8 passed on this PR. All of `test_mha.py`: 1194 passed on main and 1202 passed on this PR, with 1133 skipped on both. The four other selected attention test files have the same results on main and on this PR. gfx950 was not run locally; CI passed all 8 cases on MI35X (gfx950) and on MI300X (gfx942). Whether gfx950 fuses the float16 store the same way was not checked; the test allows it either way. The public wrappers do not take `out_dtype`, so this PR does not cover them.

PR-specific question

On main, all 8 new cases fail with `TypeError: _flash_attn_forward() got an unexpected keyword argument 'out_dtype'`. On this PR they pass. The output check fails for a store that does not round to nearest: forced round-toward-zero fails 5 of the 6 output cases. No existing test can cover this, because main has no argument that sets the output dtype. The existing tests use the default dtype, and they pass on both trees.

Changed op tests

`op_tests/triton_tests/attention/test_mha.py`: adds `test_mha_forward_out_dtype` (6 cases) and `test_mha_forward_out_dtype_rejected` (2 cases). They check that `out_dtype` sets the output dtype, that the output is the float32 output cast to that dtype, that `softmax_lse` does not change, and that unsupported values are rejected before dispatch. They call `_flash_attn_forward` directly, because the public wrappers do not take `out_dtype`. No existing test sets an output dtype.

PR state

  • PASS — pull request is marked ready for review

Copilot findings

  • FAIL — an active Copilot finding has no substantive reply from the PR author

Code and op-test hygiene

  • PASS — no committed artifact or conflict marker detected

Required CI

  • PASS — Black: passed
  • PASS — Ruff: passed
  • PASS — Repository dependency: passed
  • PASS — Aiter Test Gate: passed

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

@phambinhfin
phambinhfin force-pushed the phambinh/triton-mha-out-dtype branch from f6e7392 to 812a7a8 Compare October 31, 2026 22:00
_flash_attn_forward allocates its output as float32 for FP8 inputs and
as q.dtype otherwise, so a bfloat16 caller casts the float32 output on
the host.

out_dtype selects the output dtype; None keeps the current choice. The
kernel accumulates in float32 and casts at the store, so the narrower
output matches the float32 output to within one ULP: the backend can
fuse the epilogue multiply into the store cast and round once instead
of twice.

Signed-off-by: Pham Binh <194774975+phambinhfin@users.noreply.github.com>
@phambinhfin
phambinhfin force-pushed the phambinh/triton-mha-out-dtype branch from 812a7a8 to 81e8b0f Compare October 31, 2026 22:04
@phambinhfin
phambinhfin marked this pull request as ready for review November 1, 2026 14:29
@phambinhfin
phambinhfin requested a review from a team November 1, 2026 14:29
@github-actions github-actions Bot changed the title [Feature] MHA: add out_dtype to the Triton forward entry point [Triton/Gluon] [Feature] MHA: add out_dtype to the Triton forward entry point Nov 1, 2026
@Boss2002n
Boss2002n requested a balanced review from Copilot November 1, 2026 14:33

Copilot AI 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.

🟡 Changes recommended

Unresolved issues include incorrect FP8 capability gating, validation that does not prove the claimed exact cast equality, and dao_ai failures for float16 or float32 outputs with bfloat16 inputs.

3 open issues
What changed in this PR

Adds optional output dtype selection to the Triton MHA forward entry point, allowing FP8 callers to request bfloat16 output without a separate cast.

Changes:

  • Adds out_dtype to _flash_attn_forward while preserving existing defaults.
  • Adds 24 test cases covering input dtypes, batch and varlen layouts, causal modes, and output dtypes.
  • Leaves public wrapper signatures and the Gluon backend unchanged.
File Description
op_tests/​triton_tests/​attention/​test_mha.py Adds output dtype checks and tolerance-based comparisons with float32 output.
aiter/​ops/​triton/​attention/​mha.py Allocates the forward output using the requested dtype.

Review effort: Balanced

Comment thread aiter/ops/triton/attention/mha.py Resolved
@samremes

samremes commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Static review (no GPU run). Head reviewed: 81e8b0f.

No blocking defect: the None default keeps the old output dtype and the kernel already casts at the store, but the test contract, the description and the dao_ai behavior should agree before this leaves draft.

[P2] The test checks a tolerance, while the description claims bit-exact equality.
The test compares against the kernel's own fp32 output with rtol=finfo.eps, which admits 1 to just under 2 ulp, so a truncating store would pass. The description still states atol=0, rtol=0, 12 cases and "equal to the float32 output cast to bfloat16", from revision f6e7392; the head has 24 cases and the commit message says "within one ULP". Suggest comparing out with ref.to(expected_dtype) at a stated 1-ulp bound, and refreshing the description and results at the head.
op_tests/triton_tests/attention/test_mha.py:363-371

[P3] out_dtype fails late under the dao_ai implementation.
With out_dtype != q.dtype for bf16/fp16 inputs, fwd_prefill.py fails with "Output dtype ... must match input dtype ...", which does not name out_dtype. sink, pe_head_dim and FP8 are rejected early in this branch; an equivalent early check (and a note in the argument docs) would help.
aiter/ops/triton/attention/mha.py:692-699

[P3] The FP8 skip gate uses a different predicate from the entry point.
ANY_FP8_ARCHS includes gfx1100/1101/1102/1150/1151, where _is_fp8 raises RuntimeError, and omits gfx1250, where FP8 is supported. Skipping on not is_fp8_avail() matches the entry point.
op_tests/triton_tests/attention/test_mha.py:321

[P3] out_dtype is not validated.
Any torch.dtype is accepted. Rejecting dtypes outside fp32/bf16/fp16 (as fwd_prefill.py:1642 does) or documenting the limit, including the fp16 range, would help.
aiter/ops/triton/attention/mha.py:601-603

[P3] Coverage misses the consumer configuration and side outputs.
The test uses head size 128 and the default config. The vLLM consumer uses head size 256, varlen, FP8 and an explicit config on gfx942. return_lse=True (to confirm softmax_lse stays fp32) and the dao_ai path are also untested.
op_tests/triton_tests/attention/test_mha.py:313-371

Note: the vLLM consumer (vllm-project/vllm#62913) does not pass out_dtype yet, so it still casts after the call.

Not verified: test_mha.py and the other attention tests at this head on gfx942 (CI ran gfx950 only), the consumer configuration on gfx942, and runtime behavior of non-float or overflowing fp16 targets.

…utput

Reject an out_dtype other than float32, bfloat16 or float16. Where the
implementation requires the output dtype to match q.dtype, reject a
different out_dtype before dispatch instead of failing in fwd_prefill.

The test now compares the output with the float32 output cast to
out_dtype. An fp16 store can fuse the 1/l multiply into the cast and
round once, so it allows a 1 ulp difference on at most 1 in 1000
values; a truncating store fails it. The cases are cut to one per
behavior, including the vLLM caller's shape (FP8, varlen, head size
256). It also gates FP8 cases on is_fp8_avail(), checks that
softmax_lse is unchanged, and covers the two rejections.

Signed-off-by: Pham Binh <194774975+phambinhfin@users.noreply.github.com>
@phambinhfin

phambinhfin commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Static review (no GPU run). Head reviewed: 81e8b0f.

No blocking defect: the None default keeps the old output dtype and the kernel already casts at the store, but the test contract, the description and the dao_ai behavior should agree before this leaves draft.

[P2] The test checks a tolerance, while the description claims bit-exact equality. The test compares against the kernel's own fp32 output with rtol=finfo.eps, which admits 1 to just under 2 ulp, so a truncating store would pass. The description still states atol=0, rtol=0, 12 cases and "equal to the float32 output cast to bfloat16", from revision f6e7392; the head has 24 cases and the commit message says "within one ULP". Suggest comparing out with ref.to(expected_dtype) at a stated 1-ulp bound, and refreshing the description and results at the head. op_tests/triton_tests/attention/test_mha.py:363-371

[P3] out_dtype fails late under the dao_ai implementation. With out_dtype != q.dtype for bf16/fp16 inputs, fwd_prefill.py fails with "Output dtype ... must match input dtype ...", which does not name out_dtype. sink, pe_head_dim and FP8 are rejected early in this branch; an equivalent early check (and a note in the argument docs) would help. aiter/ops/triton/attention/mha.py:692-699

[P3] The FP8 skip gate uses a different predicate from the entry point. ANY_FP8_ARCHS includes gfx1100/1101/1102/1150/1151, where _is_fp8 raises RuntimeError, and omits gfx1250, where FP8 is supported. Skipping on not is_fp8_avail() matches the entry point. op_tests/triton_tests/attention/test_mha.py:321

[P3] out_dtype is not validated. Any torch.dtype is accepted. Rejecting dtypes outside fp32/bf16/fp16 (as fwd_prefill.py:1642 does) or documenting the limit, including the fp16 range, would help. aiter/ops/triton/attention/mha.py:601-603

[P3] Coverage misses the consumer configuration and side outputs. The test uses head size 128 and the default config. The vLLM consumer uses head size 256, varlen, FP8 and an explicit config on gfx942. return_lse=True (to confirm softmax_lse stays fp32) and the dao_ai path are also untested. op_tests/triton_tests/attention/test_mha.py:313-371

Note: the vLLM consumer (vllm-project/vllm#62913) does not pass out_dtype yet, so it still casts after the call.

Not verified: test_mha.py and the other attention tests at this head on gfx942 (CI ran gfx950 only), the consumer configuration on gfx942, and runtime behavior of non-float or overflowing fp16 targets.

Hi @samremes, thanks for the review. All points are addressed in 9dd5742.

For P2 (tolerance vs. the bit-exact claim): the test now compares out with ref.to(expected_dtype) at a 1-ulp bound, and allows at most 1 in 1000 values to differ. The 1 ulp is needed only for float16: with bfloat16 inputs and non-causal attention, the store compiles to v_fma_mixlo_f16, which rounds the 1/l multiply and the conversion once, so 13 of 524,288 values differ by 1 ulp from the double-rounded cast. bfloat16 outputs are bit-identical in every case. A store forced to round toward zero fails 5 of the 6 output cases (the sixth has a float32 output). The description and results are refreshed at the head.

For P3 (fails late): a different out_dtype is now rejected in that branch before dispatch, next to the sink, PE and FP8 checks, with Output and input must have the same dtype, got out_dtype=... and q.dtype=.... _flash_attn_forward has no argument docs, so the limit is stated in the message and in the description.

For P3 (FP8 gate): the skip now uses not is_fp8_avail(), the same check as the entry point.

For P3 (validation): an out_dtype other than float32, bfloat16 or float16 raises ValueError. On the float16 range: the output is a convex combination of the rows of V, so it can overflow only if the dequantized V values exceed the float16 maximum, which is the caller's choice.

For P3 (coverage): one case has the consumer's shape (FP8, varlen, causal, head size 256). Every case passes return_lse=True and checks that softmax_lse stays float32 and bit-identical. The rejection test covers the early check. I ran the consumer's explicit config separately at the head, with uneven sequence lengths: the bfloat16 and float16 outputs are bit-identical to the cast float32 output, causal and non-causal. I did not add it as a test case, because the config changes only the tile sizes.

For the note: right, vllm-project/vllm#62913 still casts after the call. It will pass out_dtype once an aiter version with this change is available there.

For "Not verified": now run at 9dd5742 on gfx942: all of test_mha.py (1202 passed, 1133 skipped; 1194 passed on main), the four other selected attention test files (same results as main), and the consumer configuration above. A non-float target (torch.int32) raises ValueError and is tested. An overflowing float16 target is not tested. gfx950 is covered by CI only.

@phambinhfin
phambinhfin marked this pull request as ready for review November 3, 2026 19:14
Copilot AI balanced review requested due to automatic review settings November 3, 2026 19:14
@phambinhfin
phambinhfin marked this pull request as draft November 3, 2026 19:14

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the optional output-dtype change.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@phambinhfin
phambinhfin marked this pull request as ready for review November 3, 2026 19:25
@phambinhfin

Copy link
Copy Markdown
Contributor Author

@azaidy Could you take look about this PR

@brunomazzottiamd brunomazzottiamd 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.

Requesting minor changes that are easily addressable.

Comment thread aiter/ops/triton/attention/mha.py Resolved
@brunomazzottiamd

Copy link
Copy Markdown
Contributor

Added ci:triton-300x label to run the newly added FP8 tests in gfx942. I don't want a broken gfx942 CI that needs to be fixed ASAP later.

Name the dao_ai impl in its out_dtype check. In the test, split the
softmax_lse assert in two, give each assert a message, and state how
often the fp16 store differs from the double-rounded cast.

Signed-off-by: Pham Binh <194774975+phambinhfin@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 16:06

Copilot AI 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.

🔵 Needs a closer look

The output dtype change affects Triton specialization and float16 rounding, so numerical correctness requires head-matched gfx942 and gfx950 CI validation unavailable in this source-only review.

No open issues 🎉

Review effort: Balanced

@brunomazzottiamd brunomazzottiamd 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.

LGTM!

Copilot AI balanced review requested due to automatic review settings November 4, 2026 22:02

Copilot AI 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.

🟡 Changes recommended

The float16 test tolerances and mismatch-count check allow a two-ULP error to pass instead of enforcing the stated one-ULP limit.

1 open issue

Review effort: Balanced

@brunomazzottiamd

Copy link
Copy Markdown
Contributor

Flash Attention Integration / Flash Attention - Triton / RDNA3 (1 GPU) (pull_request) CI job seems to be stuck. I contacted AITER CI team and asked for help.

@phambinhfin

Copy link
Copy Markdown
Contributor Author

Thanks @brunomazzottiamd a lot for contacting the CI team . It looks like the aiter-gfx1100 runners are offline: every RDNA3 job since yesterday 18:46 UTC is queued without a runner,

@brunomazzottiamd

Copy link
Copy Markdown
Contributor

Thanks @brunomazzottiamd a lot for contacting the CI team . It looks like the aiter-gfx1100 runners are offline: every RDNA3 job since yesterday 18:46 UTC is queued without a runner,

@phambinhfin, the hang related to Flash Attention Integration / Flash Attention - Triton / RDNA3 (1 GPU) (pull_request) CI job was also happening in #7257. It got unstuck and I was able to merge #7257 a couple of minutes ago.

AITER CI team told me the job requires a node type that's scarce in CI pool. Let's wait a bit more and hope for the best.

@phambinhfin
phambinhfin merged commit 8e69f10 into ROCm:main Nov 6, 2026
96 of 99 checks passed
ruanjm pushed a commit that referenced this pull request Nov 10, 2026
…ry point (#7232)

* [Triton/Gluon] MHA: add out_dtype to the Triton forward entry point

_flash_attn_forward allocates its output as float32 for FP8 inputs and
as q.dtype otherwise, so a bfloat16 caller casts the float32 output on
the host.

out_dtype selects the output dtype; None keeps the current choice. The
kernel accumulates in float32 and casts at the store, so the narrower
output matches the float32 output to within one ULP: the backend can
fuse the epilogue multiply into the store cast and round once instead
of twice.

Signed-off-by: Pham Binh <194774975+phambinhfin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants