Repository navigation
[graph_trainer] Preserve AC sub-fields when overriding mode to selective - #2810
Closed
SherlockNoMad wants to merge 1 commit into
Closed
SherlockNoMad wants to merge 1 commit into
SherlockNoMad wants to merge 1 commit into
Conversation
to_graph_trainer_config() was creating a fresh ActivationCheckpointConfig(mode="selective"), which silently discarded any user-configured sub-fields like preserve_rng_state, early_stop, determinism_check, debug, memory_budget, and per_op_sac_force_recompute_mm_shapes_by_fqns. Use dataclasses.replace() instead to only change the mode field while preserving all other user settings. [ghstack-poisoned]
This was referenced Apr 3, 2026
This was referenced Apr 3, 2026
SherlockNoMad
added a commit
that referenced
this pull request
Apr 9, 2026
…o selective `to_graph_trainer_config()` was creating a fresh `ActivationCheckpointConfig(mode="selective")`, which silently discarded any user-configured sub-fields like `preserve_rng_state`, `early_stop`, `determinism_check`, `debug`, `memory_budget`, and `per_op_sac_force_recompute_mm_shapes_by_fqns`. Fix: use `dataclasses.replace()` to only override the `mode` field while preserving all other user-configured values. Port of fix from PR #2810.
3 tasks
drisspg
added a commit
that referenced
this pull request
Sep 17, 2026
## 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: ```bash 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](Dao-AILab/flash-attention#2810) and the output-alignment fix from [FA4 #2880](Dao-AILab/flash-attention#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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
to_graph_trainer_config() was creating a fresh
ActivationCheckpointConfig(mode="selective"), which silently discarded
any user-configured sub-fields like preserve_rng_state, early_stop,
determinism_check, debug, memory_budget, and
per_op_sac_force_recompute_mm_shapes_by_fqns.
Use dataclasses.replace() instead to only change the mode field while
preserving all other user settings.