[ROCm][Critical] Fix the GDN import bug (#43486)

Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
This commit is contained in:
TJian
2026-05-23 21:12:58 +00:00
committed by GitHub
parent 819c610f9b
commit 46f95b2ec2
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -521,7 +521,7 @@ class _MockGDNLayer:
self.head_v_dim = head_v_dim
self.tp_size = tp_size
from vllm.model_executor.layers.mamba.gdn_linear_attn import (
from vllm.model_executor.layers.mamba.gdn.base import (
GatedDeltaNetAttention,
)
@@ -560,11 +560,14 @@ class RocmAiterRMSNormQuantFusionPass(VllmPatternMatcherPass):
# Discover (num_heads, head_dim) pairs for gated RMSNorm patterns
# from GatedDeltaNetAttention layers in static_forward_context.
from vllm.model_executor.layers.mamba.gdn_linear_attn import (
from vllm.model_executor.layers.mamba.gdn.base import (
GatedDeltaNetAttention,
)
gdn_layers = get_layers_from_vllm_config(config, GatedDeltaNetAttention)
gdn_layers = get_layers_from_vllm_config(
config,
GatedDeltaNetAttention, # type: ignore[type-abstract]
)
gated_norm_shapes: set[tuple[int, int]] = set()
for layer in gdn_layers.values():
gated_norm_shapes.add(