From a0757c9624db12767b5abe66d5ec0329873bec7a Mon Sep 17 00:00:00 2001 From: Xiaoyu Zhang <35585791+BBuf@users.noreply.github.com> Date: Mon, 2 Feb 2026 17:06:51 +0800 Subject: [PATCH] [Diffusion] Fix Ring Parallel bug with FA4 (#18062) --- python/sglang/jit_kernel/flash_attention/cute/interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/sglang/jit_kernel/flash_attention/cute/interface.py b/python/sglang/jit_kernel/flash_attention/cute/interface.py index 10bcd6220..01e53dba1 100644 --- a/python/sglang/jit_kernel/flash_attention/cute/interface.py +++ b/python/sglang/jit_kernel/flash_attention/cute/interface.py @@ -1364,6 +1364,7 @@ class FlashAttnVarlenFunc(torch.autograd.Function): pack_gqa=pack_gqa, score_mod=score_mod, aux_tensors=aux_tensors, + return_lse=True, ) ctx.save_for_backward(q, k, v, out, lse, cu_seqlens_q, cu_seqlens_k, seqused_q, seqused_k) ctx.softmax_scale = softmax_scale