[Intel GPU] Guard tvm_ffi import in dsv4 online mtp module under TYPE_CHECKING to fix import error on XPU (#28531)
Signed-off-by: P V R K Jyothendra Varma <polisetty.v.r.k.jyothendra.varma@intel.com> Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
This commit is contained in:
co-authored by
Ma Mingfei
parent
64e455d4bf
commit
62b3c8e177
@@ -1,15 +1,17 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, List, Optional
|
from typing import TYPE_CHECKING, Any, List, Optional
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from tvm_ffi.module import Module
|
|
||||||
|
|
||||||
from sglang.jit_kernel.dsv4.utils import make_name
|
from sglang.jit_kernel.dsv4.utils import make_name
|
||||||
from sglang.jit_kernel.utils import cache_once, load_jit, make_cpp_args
|
from sglang.jit_kernel.utils import cache_once, load_jit, make_cpp_args
|
||||||
from sglang.srt.environ import envs
|
from sglang.srt.environ import envs
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from tvm_ffi.module import Module
|
||||||
|
|
||||||
|
|
||||||
@cache_once
|
@cache_once
|
||||||
def _jit_online_c128_mtp_module(head_dim: int) -> Module:
|
def _jit_online_c128_mtp_module(head_dim: int) -> Module:
|
||||||
|
|||||||
Reference in New Issue
Block a user