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
42e95479
Unverified
Commit
42e95479
authored
Mar 25, 2026
by
vllmellm
Committed by
GitHub
Mar 25, 2026
Browse files
[ROCm][Test] Fix ROCM_AITER_UNIFIED_ATTN attn+quant fusion test (#37640)
Signed-off-by:
vllmellm
<
vllm.ellm@embeddedllm.com
>
parent
a32783bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
tests/compile/passes/test_fusion_attn.py
tests/compile/passes/test_fusion_attn.py
+7
-1
No files found.
tests/compile/passes/test_fusion_attn.py
View file @
42e95479
...
...
@@ -53,6 +53,7 @@ class AttentionQuantPatternModel(torch.nn.Module):
kv_cache_dtype
:
torch
.
dtype
,
device
:
torch
.
device
,
vllm_config
:
VllmConfig
,
block_size
:
int
,
**
kwargs
,
):
super
().
__init__
()
...
...
@@ -74,7 +75,7 @@ class AttentionQuantPatternModel(torch.nn.Module):
self
.
attn
.
_k_scale
=
self
.
attn
.
_k_scale
.
to
(
device
)
self
.
attn
.
_v_scale
=
self
.
attn
.
_v_scale
.
to
(
device
)
self
.
block_size
=
16
self
.
block_size
=
block_size
# Initialize attn MetadataBuilder
self
.
builder
=
self
.
attn
.
attn_backend
.
get_builder_cls
()(
...
...
@@ -299,6 +300,9 @@ def test_attention_quant_pattern(
torch
.
set_default_dtype
(
dtype
)
torch
.
manual_seed
(
42
)
backend_cls
=
backend
.
get_class
()
block_size
=
backend_cls
.
get_preferred_block_size
(
16
)
model_config
=
ModelConfig
(
model
=
model_name
,
max_model_len
=
2048
,
...
...
@@ -342,6 +346,7 @@ def test_attention_quant_pattern(
kv_cache_dtype
=
FP8_DTYPE
,
device
=
device
,
vllm_config
=
vllm_config_unfused
,
block_size
=
block_size
,
)
model_unfused
=
model_unfused
.
to
(
device
)
result_unfused_0
=
model_unfused
(
q
,
k
,
v
)
# noqa: F841 HACK: See #131044
...
...
@@ -370,6 +375,7 @@ def test_attention_quant_pattern(
device
=
device
,
vllm_config
=
vllm_config
,
w
=
model_unfused
.
w
,
block_size
=
block_size
,
)
model_fused
=
model_fused
.
to
(
device
)
...
...
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