put utils in C++ side

Signed-off-by: Jinjie Liu <jjliu@baai.ac.cn>
This commit is contained in:
2026-01-29 18:23:02 +08:00
parent 781a5396cc
commit 1a01c9f2d8
7 changed files with 137 additions and 118 deletions
-9
View File
@@ -6,7 +6,6 @@ from tvm_ffi import Object as _ffi_Object, init_ffi_api as _FFI_INIT_FUNC, regis
from tvm_ffi.libinfo import load_lib_module as _FFI_LOAD_LIB
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Mapping
from tvm_ffi import Object
from typing import Any
# isort: on
@@ -19,15 +18,11 @@ LIB = _FFI_LOAD_LIB("triton_tvm_ffi", "triton_tvm_ffi")
# fmt: off
_FFI_INIT_FUNC("triton_tvm_ffi", __name__)
if TYPE_CHECKING:
def get_device_properties(_0: int, /) -> Mapping[str, int]: ...
def launch(*args: Any) -> Any: ...
def load_binary(_0: str, _1: bytes, _2: int, _3: int, /) -> tuple[int, int, int, int, int]: ...
def string_to_type(_0: str, /) -> int | None: ...
def type_to_string(_0: int, /) -> str: ...
# fmt: on
# tvm-ffi-stubgen(end)
# tvm-ffi-stubgen(import-object): tvm_ffi.register_object;False;_FFI_REG_OBJ
# tvm-ffi-stubgen(import-object): ffi.Object;False;_ffi_Object
@_FFI_REG_OBJ("triton_tvm_ffi.TypedValue")
@@ -40,14 +35,10 @@ class TypedValue(_ffi_Object):
# fmt: on
# tvm-ffi-stubgen(end)
__all__ = [
# tvm-ffi-stubgen(begin): __all__
"LIB",
"TypedValue",
"get_device_properties",
"launch",
"load_binary",
"string_to_type",
"type_to_string",
# tvm-ffi-stubgen(end)