A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 7, 16:30 UTC
[Bugfix] fix device_name for routing replay (#34336)
Signed-off-by: liyongwen <1310439159@qq.com>
Li-Yongwen committed
Feb 26, 2026 at 20:18 UTC
c6ca51598adced41f4a1f5481a137e4cb42c71cc
1 file changed
+2
-1
vllm/model_executor/layers/fused_moe/routed_experts_capturer.py
+2
-1
@@ -20,6 +20,7 @@ import torch
20
from vllm.config import VllmConfig
21
from vllm.distributed import get_tensor_model_parallel_rank
22
from vllm.forward_context import get_forward_context
23
+from vllm.platforms import current_platform
24
25
logger = logging.getLogger(__name__)
26
@@ -132,7 +133,7 @@ class RoutedExpertsCapturer:
133
self._device_buffer = torch.zeros(
134
(max_num_batched_tokens, num_layers, num_experts_per_tok),
135
dtype=torch.int32,
135
- device="cuda",
136
+ device=current_platform.device_type,
137
)
138
self.dp_rank = vllm_config.parallel_config.data_parallel_rank
139