Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
57eec0bf
Unverified
Commit
57eec0bf
authored
Mar 25, 2025
by
lukec
Committed by
GitHub
Mar 24, 2025
Browse files
fix FlashMLA cudagraph config (#4691)
Co-authored-by:
yinfan98
<
1106310035@qq.com
>
parent
f01b0925
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
python/sglang/srt/layers/attention/flashmla_backend.py
python/sglang/srt/layers/attention/flashmla_backend.py
+4
-2
No files found.
python/sglang/srt/layers/attention/flashmla_backend.py
View file @
57eec0bf
...
...
@@ -92,7 +92,7 @@ class FlashMLABackend(FlashInferMLAAttnBackend):
if
forward_batch
.
forward_mode
.
is_decode_or_idle
():
if
spec_info
is
None
:
max_seqlen_pad
=
triton
.
cdiv
(
forward_batch
.
seq_lens
.
max
().
item
(),
PAGE_SIZE
forward_batch
.
decode_
seq_lens
_cpu
.
max
().
item
(),
PAGE_SIZE
)
block_kv_indices
=
torch
.
full
(
(
bs
,
max_seqlen_pad
),
...
...
@@ -206,8 +206,10 @@ class FlashMLABackend(FlashInferMLAAttnBackend):
):
if
forward_mode
.
is_decode_or_idle
():
assert
seq_lens_cpu
is
not
None
seq_lens
=
seq_lens
[:
bs
]
max_seqlen_pad
=
triton
.
cdiv
(
seq_lens
.
max
().
item
(),
PAGE_SIZE
)
seq_lens_cpu
=
seq_lens_cpu
[:
bs
]
max_seqlen_pad
=
triton
.
cdiv
(
seq_lens_cpu
.
max
().
item
(),
PAGE_SIZE
)
create_flashmla_kv_indices_triton
[(
bs
,)](
self
.
req_to_token
,
req_pool_indices
[:
bs
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment