[distributed] Clean up MoE groups in destroy_model_parallel (#15345)

This commit is contained in:
Yinghai Lu
2026-01-01 22:45:14 -08:00
committed by GitHub
parent bd48ad5e6b
commit 027042604d

View File

@@ -1842,6 +1842,16 @@ def destroy_model_parallel():
_PP.destroy()
_PP = None
global _MOE_EP
if _MOE_EP:
_MOE_EP.destroy()
_MOE_EP = None
global _MOE_TP
if _MOE_TP:
_MOE_TP.destroy()
_MOE_TP = None
global _PDMUX_PREFILL_TP_GROUP
if _PDMUX_PREFILL_TP_GROUP: # type: ignore[union-attr]
_PDMUX_PREFILL_TP_GROUP.destroy()