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
vllm_cscc
Commits
045b5ad2
Commit
045b5ad2
authored
Jul 05, 2024
by
zhuwenwen
Browse files
skip cutlass fwop and xformers cuda backend
parent
bbf9488b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
119 additions
and
115 deletions
+119
-115
tests/kernels/test_prefix_prefill.py
tests/kernels/test_prefix_prefill.py
+119
-115
No files found.
tests/kernels/test_prefix_prefill.py
View file @
045b5ad2
...
...
@@ -9,6 +9,7 @@ from xformers.ops.fmha.attn_bias import BlockDiagonalCausalFromBottomRightMask
from
vllm.attention.backends.xformers
import
_make_alibi_bias
from
vllm.attention.ops.prefix_prefill
import
context_attention_fwd
from
vllm.utils
import
is_hip
NUM_HEADS
=
[
64
]
NUM_QUERIES_PER_KV
=
[
1
,
8
,
64
]
...
...
@@ -158,6 +159,7 @@ def test_contexted_kv_attention(
end_time
=
time
.
time
()
print
(
f
"triton Time:
{
(
end_time
-
start_time
)
*
1000
:.
2
f
}
ms"
)
if
not
is_hip
():
scale
=
float
(
1.0
/
(
head_size
**
0.5
))
attn_op
=
xops
.
fmha
.
cutlass
.
FwOp
()
...
...
@@ -373,6 +375,8 @@ def test_contexted_kv_attention_alibi(
torch
.
cuda
.
synchronize
()
end_time
=
time
.
time
()
print
(
f
"triton Time:
{
(
end_time
-
start_time
)
*
1000
:.
2
f
}
ms"
)
if
not
is_hip
():
scale
=
float
(
1.0
/
(
head_size
**
0.5
))
# NOTE(DefTruth): In order to reuse _make_alibi_bias function,
...
...
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