[NPU] disaggregation_decode_enable_fake_auto parameter adaptation (#17811)
Co-authored-by: ronnie_zheng <zl19940307@163.com> Co-authored-by: Even Zhou <even.y.zhou@outlook.com>
This commit is contained in:
co-authored by
ronnie_zheng
Even Zhou
parent
d9050b4a9c
commit
27bec34203
@@ -26,6 +26,7 @@ class AscendKVManager(MooncakeKVManager):
|
|||||||
hostname=local_ip,
|
hostname=local_ip,
|
||||||
npu_id=self.kv_args.gpu_id,
|
npu_id=self.kv_args.gpu_id,
|
||||||
disaggregation_mode=self.disaggregation_mode,
|
disaggregation_mode=self.disaggregation_mode,
|
||||||
|
disaggregation_decode_enable_fake_auto=self.disaggregation_decode_enable_fake_auto,
|
||||||
)
|
)
|
||||||
|
|
||||||
def register_buffer_to_engine(self):
|
def register_buffer_to_engine(self):
|
||||||
|
|||||||
@@ -21,7 +21,11 @@ logger = logging.getLogger(__name__)
|
|||||||
class AscendTransferEngine(MooncakeTransferEngine):
|
class AscendTransferEngine(MooncakeTransferEngine):
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, hostname: str, npu_id: int, disaggregation_mode: DisaggregationMode
|
self,
|
||||||
|
hostname: str,
|
||||||
|
npu_id: int,
|
||||||
|
disaggregation_mode: DisaggregationMode,
|
||||||
|
disaggregation_decode_enable_fake_auto: bool,
|
||||||
):
|
):
|
||||||
if import_error is not None:
|
if import_error is not None:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
@@ -32,6 +36,9 @@ class AscendTransferEngine(MooncakeTransferEngine):
|
|||||||
self.engine = TransferEngine()
|
self.engine = TransferEngine()
|
||||||
self.hostname = hostname
|
self.hostname = hostname
|
||||||
self.npu_id = npu_id
|
self.npu_id = npu_id
|
||||||
|
self.disaggregation_decode_enable_fake_auto = (
|
||||||
|
disaggregation_decode_enable_fake_auto
|
||||||
|
)
|
||||||
|
|
||||||
# Centralized storage address of the AscendTransferEngine
|
# Centralized storage address of the AscendTransferEngine
|
||||||
self.store_url = os.getenv("ASCEND_MF_STORE_URL")
|
self.store_url = os.getenv("ASCEND_MF_STORE_URL")
|
||||||
@@ -67,6 +74,12 @@ class AscendTransferEngine(MooncakeTransferEngine):
|
|||||||
output_tensor_list, tmp_tensor, group=get_tp_group().device_group
|
output_tensor_list, tmp_tensor, group=get_tp_group().device_group
|
||||||
)
|
)
|
||||||
"""Initialize the ascend transfer instance."""
|
"""Initialize the ascend transfer instance."""
|
||||||
|
if self.disaggregation_decode_enable_fake_auto:
|
||||||
|
logger.info(
|
||||||
|
"Ascend Transfer Engine is not initialized in decode fake transfer mode."
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
ret_value = self.engine.initialize(
|
ret_value = self.engine.initialize(
|
||||||
self.store_url, self.session_id, self.role, self.npu_id, trans_op_type
|
self.store_url, self.session_id, self.role, self.npu_id, trans_op_type
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ class CommonKVManager(BaseKVManager):
|
|||||||
self.kv_args = args
|
self.kv_args = args
|
||||||
self.is_mla_backend = is_mla_backend
|
self.is_mla_backend = is_mla_backend
|
||||||
self.disaggregation_mode = disaggregation_mode
|
self.disaggregation_mode = disaggregation_mode
|
||||||
|
self.disaggregation_decode_enable_fake_auto = (
|
||||||
|
server_args.disaggregation_decode_enable_fake_auto
|
||||||
|
)
|
||||||
# for p/d multi node infer
|
# for p/d multi node infer
|
||||||
self.bootstrap_host = server_args.host
|
self.bootstrap_host = server_args.host
|
||||||
self.bootstrap_port = server_args.disaggregation_bootstrap_port
|
self.bootstrap_port = server_args.disaggregation_bootstrap_port
|
||||||
|
|||||||
Reference in New Issue
Block a user