diff --git a/python/sglang/srt/disaggregation/ascend/conn.py b/python/sglang/srt/disaggregation/ascend/conn.py index 661a0cc4e..878a1abb7 100644 --- a/python/sglang/srt/disaggregation/ascend/conn.py +++ b/python/sglang/srt/disaggregation/ascend/conn.py @@ -26,6 +26,7 @@ class AscendKVManager(MooncakeKVManager): hostname=local_ip, npu_id=self.kv_args.gpu_id, disaggregation_mode=self.disaggregation_mode, + disaggregation_decode_enable_fake_auto=self.disaggregation_decode_enable_fake_auto, ) def register_buffer_to_engine(self): diff --git a/python/sglang/srt/disaggregation/ascend/transfer_engine.py b/python/sglang/srt/disaggregation/ascend/transfer_engine.py index 59233d00e..b7f0cbd92 100644 --- a/python/sglang/srt/disaggregation/ascend/transfer_engine.py +++ b/python/sglang/srt/disaggregation/ascend/transfer_engine.py @@ -21,7 +21,11 @@ logger = logging.getLogger(__name__) class AscendTransferEngine(MooncakeTransferEngine): 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: logger.warning( @@ -32,6 +36,9 @@ class AscendTransferEngine(MooncakeTransferEngine): self.engine = TransferEngine() self.hostname = hostname self.npu_id = npu_id + self.disaggregation_decode_enable_fake_auto = ( + disaggregation_decode_enable_fake_auto + ) # Centralized storage address of the AscendTransferEngine 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 ) """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( self.store_url, self.session_id, self.role, self.npu_id, trans_op_type ) diff --git a/python/sglang/srt/disaggregation/common/conn.py b/python/sglang/srt/disaggregation/common/conn.py index 67fe82ad6..c6107224d 100644 --- a/python/sglang/srt/disaggregation/common/conn.py +++ b/python/sglang/srt/disaggregation/common/conn.py @@ -52,6 +52,9 @@ class CommonKVManager(BaseKVManager): self.kv_args = args self.is_mla_backend = is_mla_backend self.disaggregation_mode = disaggregation_mode + self.disaggregation_decode_enable_fake_auto = ( + server_args.disaggregation_decode_enable_fake_auto + ) # for p/d multi node infer self.bootstrap_host = server_args.host self.bootstrap_port = server_args.disaggregation_bootstrap_port