forked from Karylab-cklius/vllm
[ROCm][Critical] Fix the GDN import bug (#43486)
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user