diff --git a/sgl-kernel/src/sgl-kernel/__init__.py b/sgl-kernel/src/sgl-kernel/__init__.py index a3d35072d..ff41db8e4 100644 --- a/sgl-kernel/src/sgl-kernel/__init__.py +++ b/sgl-kernel/src/sgl-kernel/__init__.py @@ -1,3 +1,12 @@ +import ctypes +import os + +if os.path.exists("/usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.12"): + ctypes.CDLL( + "/usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.12", + mode=ctypes.RTLD_GLOBAL, + ) + from sgl_kernel.ops import ( apply_rope_with_cos_sin_cache_inplace, bmm_fp8,