docker: use FA3 3.0.0 for transformer_engine 2.17 - #1799
Merged
Conversation
TE 2.17 moved use_flash_attn_3 out of the window_size-tuple branch in cp_p2p_fwd/bwd_flash_attn, so it passes window_size_left/right to FA3. The flash_attn_3 wheel in miles-wheels was 3.0.0b1, whose _flash_attn_forward only accepts a window_size tuple, so every context-parallel path raises TypeError. TE has no FA3-only kill switch -- NVTE_FLASH_ATTN disables FA2 too. miles-wheels#10 rebuilt the wheel at flash-attention 00756db (3.0.0) and replaced the release asset, so the pip install here already picks it up. That wheel ships flash_attn_interface top-level and a flash_attn_3 re-export shim, making the separate interface fetch unnecessary -- and harmful, since it pinned a second revision that can drift from the one the extension module was built at, and overwriting the shim with the full module double-registers the flash_attn_3:: custom ops.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Zhichenzzz
approved these changes
Jul 26, 2026
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.
Problem
#1781 bumped transformer_engine to 2.17.0. TE 2.17 moved
use_flash_attn_3outof the
window_size-tuple branch incp_p2p_fwd_flash_attn/cp_p2p_bwd_flash_attn:The
flash_attn_3wheel we ship was3.0.0b1, whose_flash_attn_forwardonlyaccepts a single
window_sizetuple, so every context-parallel path raisesTypeError: got an unexpected keyword argument 'window_size_left'. There areeight such call sites in
context_parallel.py(five forward, three backward).TE has no FA3-only kill switch —
NVTE_FLASH_ATTNdisables FA2 and FA3together. FA2 in the same image (
2.7.4.post1) already takes the new kwargs, soonly the FA3 path is affected.
Why this never broke before
TE's version gate is a silent capability gate that also guards the import. Under
TE 2.12 the tuple was correct, so nothing failed. The 2.17 bump is the first
time this pairing is exercised — and main's scheduled docker builds have been
failing since #1781 landed, so
:devstill carries TE 2.12 and main looks green.Change
yueming-yuan/miles-wheels#10 rebuilt the wheel at flash-attention
00756db(version
3.0.0) and replaced thecu130-x86_64release asset, so the existingpip install /tmp/wheels/flash_attn_3-*.whlalready resolves to it.This PR only drops the separate
flash_attn_interface.pyfetch. That fetch was asecond revision pin that can drift from the one the extension module was built
at. It is now both unnecessary and harmful:
flash_attn_interfacetop-level, which is what TE 2.17 imports;flash_attn_3.flash_attn_interfaceas a re-export shim;@torch.library.custom_op("flash_attn_3::_flash_attn_forward")anddouble-registers the ops.
Nothing in miles or sglang imports
flash_attn_3.flash_attn_interface.Verification
Built and installed on an h200-sci devbox running the miles image itself
(torch 2.11.0+cu130, CUDA 13.0), so the wheel matches the toolchain it ships with:
Checked so it is not rediscovered later:
sm_80+sm_90a, confirmed withcuobjdumpagainst both the old and new
_C.abi3.so.hopper/setup.pyderives arch fromsource-file suffixes and ignores
TORCH_CUDA_ARCH_LIST, so FA3 has never hadBlackwell kernels here.
3.0.0b1->3.0.0is benign. It flipsFlashAttentionUtils.v3_0_0_betato
False; its only consumer appends an "update your flash-attn v3 beta" hintto an already-raised
TypeError. No functional branch depends on it.3.0.0returns(out, softmax_lse, out_accum, softmax_lse_accum); TE reads[0]and[1]under
use_flash_attn_3.Full CP coverage runs in #1795, which cherry-picks this change.