Repository navigation
Conversation
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com> (cherry picked from commit c5c7e7c0a870b0d343f2f187029248e77d960d05)
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
|
/ok to test 6ff7723 |
|
LGTM — focused, correct fix for Qwen3-VL core attention THD boundaries, with direct unit coverage. Review notes:
Suggested test cases
|
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
|
/ok to test b8af67f |
…attention-tail-padding Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
|
/ok to test 7304302 |
|
LGTM - focused, well-reasoned fix for Qwen3-VL THD core attention. What the change does: _get_core_attention_packed_seq_params shallow-copies PackedSeqParams and passes the physical (padded) THD boundaries to the TE core-attention kernel, sidestepping the padded-layout inference in TE that mishandles the final cumulative offset. The original params are left intact for the surrounding hybrid-layer logic. Correctness review (no blocking issues):
Minor (non-blocking): Tests cover the helper in isolation but not that forward() actually threads core_attention_packed_seq_params into the TE call. That path needs GPU/TE so a unit test is not practical - acceptable. Suggested test cases:
|
|
Hi, why is this closed without merged? Is the problem not exist anymore? |
What
Why
Energon online packing can produce a pack where only the final cumulative offset differs between logical and physical layouts. Transformer Engine's padded-layout inference does not detect that tail-only difference, so attention backward can interpret a longer physical THD stream with inconsistent logical boundaries and produce exploding gradients or NaNs.
The physical-boundary view is limited to causal core attention. It avoids unsupported explicit padding selection while preserving the richer metadata everywhere else.
Follow-up to #5455.
Validation
uv run pre-commit run --all-filespassed.The runtime validation used 16K sequences, TP1/CP1/PP1/EP32, MBS1/GBS32, and
packing_buffer_size=16.