From 4f9b12c5ddad5d4d36f9392496e1e2966208c1bf Mon Sep 17 00:00:00 2001 From: ashwini rathi Date: Wed, 17 Jun 2026 04:22:12 +0530 Subject: [PATCH] [XPU] Guard tvm_ffi import in dsv4 compress modules under TYPE_CHECKING (#28426) --- python/sglang/jit_kernel/dsv4/compress.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/sglang/jit_kernel/dsv4/compress.py b/python/sglang/jit_kernel/dsv4/compress.py index cd62eaf29..610406932 100644 --- a/python/sglang/jit_kernel/dsv4/compress.py +++ b/python/sglang/jit_kernel/dsv4/compress.py @@ -1,9 +1,8 @@ from __future__ import annotations -from typing import Literal, NamedTuple, Optional, Union +from typing import TYPE_CHECKING, Literal, NamedTuple, Optional, Union import torch -from tvm_ffi.module import Module from sglang.jit_kernel.utils import ( cache_once, @@ -14,6 +13,9 @@ from sglang.jit_kernel.utils import ( from .utils import make_name +if TYPE_CHECKING: + from tvm_ffi.module import Module + @cache_once def _jit_compress_norm_rope_module(