[NPU]Fix for ipc handle with npu (#14138)

This commit is contained in:
Mayyyy
2025-12-19 22:39:04 +08:00
committed by GitHub
parent f3705b0115
commit 2c5a446006
2 changed files with 41 additions and 13 deletions

View File

@@ -182,7 +182,10 @@ from sglang.srt.utils.offloader import (
get_offloader,
set_offloader,
)
from sglang.srt.utils.patch_torch import monkey_patch_torch_reductions
from sglang.srt.utils.patch_torch import (
monkey_patch_torch_reductions,
register_sgl_tp_rank,
)
from sglang.srt.utils.torch_memory_saver_adapter import TorchMemorySaverAdapter
from sglang.srt.utils.weight_checker import WeightChecker
from sglang.srt.weight_sync.tensor_bucket import (
@@ -759,6 +762,8 @@ class ModelRunner:
server_args=self.server_args,
model_config=self.model_config,
)
if is_npu():
register_sgl_tp_rank(self.gpu_id)
min_per_gpu_memory = get_available_gpu_memory(
self.device,