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
fengzch-das
nunchaku
Commits
26d89be7
Commit
26d89be7
authored
Jan 07, 2026
by
fengzch
Browse files
fix: 取消对sparse attention的依赖
parent
781a9ec8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
README.md
README.md
+3
-0
setup.py
setup.py
+1
-1
src/FluxModel.cpp
src/FluxModel.cpp
+1
-0
No files found.
README.md
View file @
26d89be7
flash_c_api 放在third_party目录下
编译指令:
source /opt/dtk/env.sh
source /opt/dtk/env.sh
source /usr/local/bin/fastpt -T
source /usr/local/bin/fastpt -T
...
...
setup.py
View file @
26d89be7
...
@@ -100,7 +100,7 @@ if __name__ == "__main__":
...
@@ -100,7 +100,7 @@ if __name__ == "__main__":
"third_party/json/include"
,
"third_party/json/include"
,
"third_party/mio/include"
,
"third_party/mio/include"
,
"third_party/spdlog/include"
,
"third_party/spdlog/include"
,
"third_party/Block-Sparse-Attention/csrc/block_sparse_attn"
,
#
"third_party/Block-Sparse-Attention/csrc/block_sparse_attn",
"third_party/flash_c_api/include"
,
"third_party/flash_c_api/include"
,
]
]
...
...
src/FluxModel.cpp
View file @
26d89be7
...
@@ -278,6 +278,7 @@ Tensor Attention::forward(Tensor qkv, Tensor pool_qkv, float sparsityRatio) {
...
@@ -278,6 +278,7 @@ Tensor Attention::forward(Tensor qkv, Tensor pool_qkv, float sparsityRatio) {
// -1,
// -1,
// -1)
// -1)
// .front();
// .front();
Tensor
raw_attn_output
=
Tensor
::
ones
({
batch_size
*
num_tokens
,
num_heads
,
dim_head
},
Tensor
::
FP16
,
Device
::
cuda
());
std
::
cout
<<
"mha_fwd_block not support !!!"
<<
std
::
endl
;
std
::
cout
<<
"mha_fwd_block not support !!!"
<<
std
::
endl
;
debug
(
"raw_attn_output"
,
raw_attn_output
);
debug
(
"raw_attn_output"
,
raw_attn_output
);
...
...
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