2626 BinaryOpExpr as _BinaryOpExpr ,
2727)
2828from tvm .tir .op import call_pure_extern
29+ from tvm .ffi import get_global_func
2930from tvm .ffi import register_func as _register_func
3031from tvm .tir import call_intrin
3132
@@ -55,7 +56,7 @@ def register(type_name, type_code):
5556 The type's code, which should be >= kCustomBegin. See
5657 include/tvm/runtime/data_type.h.
5758 """
58- tvm . runtime . _ffi_api . _datatype_register (type_name , type_code )
59+ get_global_func ( "dtype.register_custom_type" ) (type_name , type_code )
5960
6061
6162def get_type_name (type_code ):
@@ -82,7 +83,7 @@ def get_type_name(type_code):
8283 The name of the custom datatype.
8384
8485 """
85- return tvm . runtime . _ffi_api . _datatype_get_type_name (type_code )
86+ return get_global_func ( "dtype.get_custom_type_name" ) (type_code )
8687
8788
8889def get_type_code (type_name ):
@@ -108,7 +109,7 @@ def get_type_code(type_name):
108109 type_code : int
109110 The type code of the custom datatype.
110111 """
111- return tvm . runtime . _ffi_api . _datatype_get_type_code (type_name )
112+ return get_global_func ( "dtype.get_custom_type_code" ) (type_name )
112113
113114
114115def get_type_registered (type_code ):
0 commit comments