Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
FlashMLA
Commits
2ff5a773
Commit
2ff5a773
authored
Mar 20, 2026
by
zhanghj2
Browse files
加入print_param
parent
79096f6b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
csrc/api/dense_decode.h
csrc/api/dense_decode.h
+15
-1
csrc/api/sparse_decode.h
csrc/api/sparse_decode.h
+12
-1
No files found.
csrc/api/dense_decode.h
View file @
2ff5a773
...
...
@@ -121,7 +121,21 @@ dense_attn_decode_interface(
KU_CHECK_SHAPE
(
tile_scheduler_metadata
,
num_sm_parts
,
sizeof
(
DecodingSchedMeta
)
/
sizeof
(
int
));
KU_CHECK_SHAPE
(
num_splits
,
batch_size
+
1
);
}
bool
print_param
=
(
std
::
getenv
(
"FLASH_MLA_PRINT_PARAM"
)
!=
nullptr
);
if
(
print_param
)
{
fprintf
(
stderr
,
"[FlashMLA] [dense_attn_decode_interface] [%s] batch_size = %d seqlen_q_ori = %d "
"num_heads_q = %d head_size_k = %d max_num_blocks_per_seq = %d num_blocks %d page_block_size = %d num_heads_k = %d
\n
"
,
arch
.
archName
.
c_str
(),
batch_size
,
seqlen_q_ori
,
num_heads_q
,
head_size_k
,
max_num_blocks_per_seq
,
num_blocks
,
page_block_size
,
num_heads_k
);
}
// Set the sizes
DenseAttnDecodeParams
params
;
params
.
b
=
batch_size
;
...
...
csrc/api/sparse_decode.h
View file @
2ff5a773
...
...
@@ -228,7 +228,18 @@ sparse_attn_decode_interface(
}
else
{
TORCH_CHECK
(
false
,
"Unsupported d_qk: "
,
d_qk
);
}
bool
print_param
=
(
std
::
getenv
(
"FLASH_MLA_PRINT_PARAM"
)
!=
nullptr
);
if
(
print_param
)
{
fprintf
(
stderr
,
"[FlashMLA] [sparse_attn_decode_interface] b = %d s_q = %d h_q = %d d_qk = %d num_blocks = %d page_block_size = %d h_kv = %d topk = %d "
"bytes_per_token = %ld have_topk_length = %d "
"have_extra_kcache = %d have_extra_topk_length = %d have_attn_sink = %d
\n
"
,
b
,
s_q
,
h_q
,
d_qk
,
num_blocks
,
page_block_size
,
h_kv
,
topk
,
kv
.
stride
(
1
),
have_topk_length
,
have_extra_kcache
,
have_extra_topk_length
,
have_attn_sink
);
}
std
::
vector
<
DecodeFeatures
>
features
;
if
(
h_q
<=
16
)
{
features
.
push_back
(
DecodeFeatures
::
HEAD_16
);
...
...
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