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
6d68e3d1
Commit
6d68e3d1
authored
Jan 29, 2026
by
zhanghj2
Browse files
减少lds用量
parent
5d62c0d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
csrc/sm90/prefill/sparse/phase1.cuh
csrc/sm90/prefill/sparse/phase1.cuh
+1
-1
No files found.
csrc/sm90/prefill/sparse/phase1.cuh
View file @
6d68e3d1
...
@@ -485,7 +485,7 @@ void KernelTemplate<D_QK, HAVE_TOPK_LENGTH>::run(const SparseAttnFwdParams ¶
...
@@ -485,7 +485,7 @@ void KernelTemplate<D_QK, HAVE_TOPK_LENGTH>::run(const SparseAttnFwdParams ¶
KU_ASSERT
(
params
.
topk
>
0
);
KU_ASSERT
(
params
.
topk
>
0
);
KU_ASSERT
(
params
.
h_q
%
B_H
==
0
);
KU_ASSERT
(
params
.
h_q
%
B_H
==
0
);
auto
kernel
=
&
sparse_attn_fwd_kernel
<
KernelTemplate
<
D_QK
,
HAVE_TOPK_LENGTH
>>
;
auto
kernel
=
&
sparse_attn_fwd_kernel
<
KernelTemplate
<
D_QK
,
HAVE_TOPK_LENGTH
>>
;
constexpr
size_t
smem_size
=
65536
;
constexpr
size_t
smem_size
=
16384
+
4096
;
// 做了lds复用
dim3
grid
(
params
.
s_q
,
params
.
h_q
/
B_H
,
1
);
dim3
grid
(
params
.
s_q
,
params
.
h_q
/
B_H
,
1
);
kernel
<<<
grid
,
NUM_THREADS
,
smem_size
,
params
.
stream
>>>
(
params
);
kernel
<<<
grid
,
NUM_THREADS
,
smem_size
,
params
.
stream
>>>
(
params
);
KU_CHECK_KERNEL_LAUNCH
();
KU_CHECK_KERNEL_LAUNCH
();
...
...
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