Skip to content

[RL] Require FA4 b31 for hd256 paged attention - #4737

Merged
drisspg merged 1 commit into
mainfrom
drisspg/rl-runtime-setup-20260913
Sep 17, 2026
Merged

drisspg merged 1 commit into
mainfrom
drisspg/rl-runtime-setup-20260913

Conversation

@drisspg

@drisspg drisspg commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Published b31 is now available and validated on GB200.

PR chain: #4736 (Gym release, merged); this PR, based on main -> #4738 (GDN FULL graphs, waiting for the next Gym release).

Update the Blackwell FA4 recommendation to:

uv pip install "flash-attn-4[cu13]>=4.0.0b31"

Qwen3.5 head-dimension-256 paged inference needs the sequence-length/paged-KV fixes from FA4 #2810 and the output-alignment fix from FA4 #2880. The inspected PyPI b30 wheel predates those changes.

Only +2/-1 in the RL README. Original unpinned Torch/torchvision/vLLM/torchcomms instructions, CUDA index, and existing FFI warning remain unchanged.

Published b31 validation

Installed exact flash-attn-4[cu13]==4.0.0b31 from PyPI, using normal binary-only dependency resolution. All 52 installed Python files match the published wheel. Torch, vLLM, Gym, CuTeDSL and TVM-FFI versions were unchanged; this is not a fresh-environment dependency-resolution claim.

  • Reproduced b30's SM100 forward with head_dim=256 does not support seqused_q/seqused_k failure. The identical GPU call passes on published b31.
  • Four GPU cases passed against an independent FP64 reference: decode/prefill, non-page-aligned KV lengths, oversized shuffled page tables, packed KV strides, and padded/transposed output alignment.
  • Seven existing TorchTitan tests passed on the graph layer's unchanged model/test sources, including real Qwen3.5-0.8B TP1/DP1 eager/FULL execution in regular and batch-invariant modes. Each mode independently matched exactly: 96 generated tokens, 480 logprob entries/ranks, cumulative logprobs, and 1,584 used conv/SSM state hashes; 43 actual FULL replays per mode.
  • Tests explicitly forced Flash and recorded actual FA4 calls, including capture. Activation alone can allow cuDNN selection in this Torch build.

Limits: GB200/SM100, BF16 forward, TP1 only. Unused KV padding must be finite: a separate NaN-poison probe contaminates b31 outputs. The established environment's FFI/optional-package/platform-tag warnings are unchanged. No performance remeasurement or equality claim against the previous development FA4 build. Historical trace results still use source commit 383cbcba.

Only the README minimum changes in this PR; graph support and its Gym release dependency remain in #4738. Requirement syntax, scoped pre-commit and whitespace checks previously passed; the reorder preserves the combined source tree exactly.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 16, 2026
@drisspg
drisspg added this pull request to stack #4739 September 16, 2026 02:26
@drisspg
drisspg force-pushed the drisspg/rl-runtime-setup-20260913 branch from 9c68524 to 0181045 Compare September 16, 2026 02:35
@drisspg drisspg changed the title [RL] Document the validated Qwen inference runtime [RL] Pin FA4 with hd256 paged-attention fixes Sep 16, 2026
@drisspg
drisspg removed this pull request from stack #4739 September 16, 2026 02:39
@drisspg
drisspg changed the base branch from drisspg/attn-gym-0.0.9 to drisspg/gdn-prefill-cudagraph September 16, 2026 02:39
@drisspg
drisspg force-pushed the drisspg/rl-runtime-setup-20260913 branch from 0181045 to 3a55904 Compare September 16, 2026 02:39
@drisspg
drisspg added this pull request to stack #4740 September 16, 2026 02:39
@drisspg drisspg changed the title [RL] Pin FA4 with hd256 paged-attention fixes [RL] Require FA4 b31 for hd256 paged attention Sep 16, 2026
drisspg added a commit that referenced this pull request Sep 16, 2026
## Summary

PR chain: **this PR** -> #4738 (Qwen/FULL-graph fix) -> #4737 (FA4 b31
pin, pending publication).

Bump `attn-gym[linear]` from **0.0.8 to the published 0.0.9 release** in
`pyproject.toml` and `.ci/docker/requirements.txt`.

This is the dependency-only bottom layer for the GDN capture work in
#4738. No TorchTitan model, vLLM integration, or graph behavior changes
are included.

## Validation

- PyPI release availability and published wheel SHA256 verified.
- Published wheel is byte-identical to the release workflow artifact.
Compared with the previously validated source pin, 202 Python files are
unchanged; only three sparse-indexer files differ. GDN/gate code is
unchanged.
- Installed the published release into the existing validated Torch/vLLM
environment. Import checks from outside the checkout passed.
- Real Qwen3.5-0.8B TP1 engine validation passed on this dependency-only
layer: five batches of 32 requests x 4096 input tokens, with 64
scheduler chunks per batch. Generated outputs also match the historical
pre-bump baseline exactly. This was a compatibility check, not a new
performance measurement.
- Dependency pin consistency, scoped pre-commit, and whitespace checks
passed.

The following layer (#4738) adds FULL-graph support; #4737 updates the
FA4 recommendation afterward, pending b31 publication. This PR can be
reviewed independently as a two-line dependency bump.
@drisspg
drisspg force-pushed the drisspg/rl-runtime-setup-20260913 branch from 3a55904 to 6b6f5c0 Compare September 16, 2026 03:09
@drisspg
drisspg force-pushed the drisspg/rl-runtime-setup-20260913 branch 2 times, most recently from bd332cd to 97a5366 Compare September 16, 2026 21:40
@drisspg
drisspg removed this pull request from stack #4740 September 16, 2026 22:22
@drisspg
drisspg changed the base branch from drisspg/gdn-prefill-cudagraph to main September 16, 2026 22:22
@drisspg
drisspg force-pushed the drisspg/rl-runtime-setup-20260913 branch from 97a5366 to 1e148d8 Compare September 16, 2026 22:22
@drisspg
drisspg marked this pull request as ready for review September 16, 2026 22:43
@pytorch-bot pytorch-bot Bot added the ciflow/fake-pg Run 1-GPU Fake PG integration tests label Sep 16, 2026
@drisspg
drisspg added this pull request to stack #4758 September 16, 2026 22:52
@drisspg
drisspg force-pushed the drisspg/rl-runtime-setup-20260913 branch from 1e148d8 to fbbb2dd Compare September 16, 2026 23:07
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 ciflow/rl 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.

2 participants