From a0e6effe506ac266b41875d8281b4cacd0e71fb3 Mon Sep 17 00:00:00 2001 From: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:26:32 +0800 Subject: [PATCH] [Fix] Link cuda_ipc JIT against CUDA driver stubs dir (#43764) --- python/sglang/kernels/ops/communication/all_reduce.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sglang/kernels/ops/communication/all_reduce.py b/python/sglang/kernels/ops/communication/all_reduce.py index d7f39e33b1..fc94b74841 100644 --- a/python/sglang/kernels/ops/communication/all_reduce.py +++ b/python/sglang/kernels/ops/communication/all_reduce.py @@ -9,6 +9,7 @@ from tvm_ffi import Module from sglang.kernels.jit.utils import ( cache_once, + cuda_stubs_dir, empty_sentinel, is_arch_support_pdl, lazy_register_class, @@ -182,7 +183,7 @@ class Communicator(tvm_ffi.Object): def _init_ipc_manager() -> None: module = load_jit( "cuda_ipc", - extra_ldflags=["-lcuda"], + extra_ldflags=[f"-L{cuda_stubs_dir()}", "-lcuda"], cuda_files=["distributed/ipc.cuh"], cuda_wrappers=[("register_once", "register_ipc_manager")], )