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
dd1161e3
"vscode:/vscode.git/clone" did not exist on "243eca854ff763bc2b10648849a3fdf78edb9eda"
Unverified
Commit
dd1161e3
authored
Feb 24, 2025
by
Jiashi Li
Committed by
GitHub
Feb 24, 2025
Browse files
Merge pull request #14 from lancerts/minor-fix
minor fix test
parents
accc1695
4fbaa952
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tests/test_flash_mla.py
tests/test_flash_mla.py
+3
-1
No files found.
tests/test_flash_mla.py
View file @
dd1161e3
...
@@ -7,7 +7,7 @@ import triton
...
@@ -7,7 +7,7 @@ import triton
from
flash_mla
import
get_mla_metadata
,
flash_mla_with_kvcache
from
flash_mla
import
get_mla_metadata
,
flash_mla_with_kvcache
def
scaled_dot_product_attention
(
query
,
key
,
value
,
is_causal
=
False
):
def
scaled_dot_product_attention
(
query
,
key
,
value
,
h_q
,
h_kv
,
is_causal
=
False
):
query
=
query
.
float
()
query
=
query
.
float
()
key
=
key
.
float
()
key
=
key
.
float
()
value
=
value
.
float
()
value
=
value
.
float
()
...
@@ -76,6 +76,8 @@ def test_flash_mla(b, s_q, mean_sk, h_q, h_kv, d, dv, causal, varlen):
...
@@ -76,6 +76,8 @@ def test_flash_mla(b, s_q, mean_sk, h_q, h_kv, d, dv, causal, varlen):
q
[
i
].
transpose
(
0
,
1
),
q
[
i
].
transpose
(
0
,
1
),
blocked_k
.
view
(
-
1
,
h_kv
,
d
)[
begin
:
end
].
transpose
(
0
,
1
),
blocked_k
.
view
(
-
1
,
h_kv
,
d
)[
begin
:
end
].
transpose
(
0
,
1
),
blocked_v
.
view
(
-
1
,
h_kv
,
dv
)[
begin
:
end
].
transpose
(
0
,
1
),
blocked_v
.
view
(
-
1
,
h_kv
,
dv
)[
begin
:
end
].
transpose
(
0
,
1
),
h_q
=
h_q
,
h_kv
=
h_kv
,
is_causal
=
causal
,
is_causal
=
causal
,
)
)
out
[
i
]
=
O
.
transpose
(
0
,
1
)
out
[
i
]
=
O
.
transpose
(
0
,
1
)
...
...
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