From 81962bb6995eaebd1e49998c2a91c9e01e24da27 Mon Sep 17 00:00:00 2001 From: "rongfu.leng" Date: Mon, 27 Jul 2026 20:12:23 +0800 Subject: [PATCH] [Bugfix]Reject invalid FlashInfer MNNVL workspaces (#49043) Signed-off-by: lengrongfu Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../device_communicators/flashinfer_all_reduce.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vllm/distributed/device_communicators/flashinfer_all_reduce.py b/vllm/distributed/device_communicators/flashinfer_all_reduce.py index 8d3e8170924..4e4635035cc 100644 --- a/vllm/distributed/device_communicators/flashinfer_all_reduce.py +++ b/vllm/distributed/device_communicators/flashinfer_all_reduce.py @@ -67,6 +67,12 @@ def _create_workspace( comm_backend=comm_backend, group=group, ) + if backend == "mnnvl" and not getattr(workspace, "mc_ptr", 0): + workspace.destroy() + logger.warning_once( + "FlashInfer MNNVL multicast is unavailable on the current topology." + ) + return None except Exception as e: if "multicast" in str(e).lower(): logger.warning_once(