[NPU][feature adapt]remote load weight feature adp npu (#17968)
Co-authored-by: littleYellowBicycle <liguo29@huawei.com> Co-authored-by: sglang-npu-bot <sglangnpu@163.com>
This commit is contained in:
committed by
GitHub
parent
e567215e44
commit
5b5c509480
@@ -17,7 +17,7 @@ class RemoteInstanceConnector(BaseConnector):
|
||||
|
||||
def __init__(self, url: str, device: torch.device = "cpu"):
|
||||
assert (
|
||||
device.type == "cuda"
|
||||
device.type == "cuda" or device.type == "npu"
|
||||
), "RemoteInstanceConnector only supports cuda device."
|
||||
super().__init__(url)
|
||||
self.url = url
|
||||
@@ -32,7 +32,7 @@ class RemoteInstanceConnector(BaseConnector):
|
||||
world_size: int = 2,
|
||||
):
|
||||
assert (
|
||||
self.device.type == "cuda"
|
||||
self.device.type == "cuda" or self.device.type == "npu"
|
||||
), "RemoteInstanceConnector only supports cuda device."
|
||||
assert (
|
||||
gpu_id != -1 and tp_rank != -1
|
||||
|
||||
@@ -2563,8 +2563,8 @@ class ServerArgs:
|
||||
)
|
||||
self.load_format = "auto"
|
||||
elif (
|
||||
not self.validate_transfer_engine()
|
||||
and self.remote_instance_weight_loader_backend == "transfer_engine"
|
||||
self.remote_instance_weight_loader_backend == "transfer_engine"
|
||||
and not self.validate_transfer_engine()
|
||||
):
|
||||
logger.warning(
|
||||
"Fallback load_format to 'auto' due to 'transfer_engine' backend is not supported."
|
||||
|
||||
Reference in New Issue
Block a user