junrushao1994 commented on a change in pull request #7809:
URL: https://github.com/apache/tvm/pull/7809#discussion_r616950245



##########
File path: python/tvm/ir/op.py
##########
@@ -17,9 +17,21 @@
 # pylint: disable=invalid-name
 """Primitive operators in the TVM IR."""
 import tvm._ffi
+from tvm._ffi.base import _FFI_MODE
 from .expr import RelayExpr
 from . import _ffi_api
 
+try:
+    # pylint: disable=wrong-import-position,unused-import
+    if _FFI_MODE == "ctypes":
+        raise ImportError()
+    from tvm._ffi._cy3.core import convert_to_tvm_func, _get_global_func, 
PackedFuncBase
+except (RuntimeError, ImportError) as error:
+    # pylint: disable=wrong-import-position,unused-import
+    if _FFI_MODE == "cython":
+        raise error
+    from tvm._ffi._ctypes.packed_func import convert_to_tvm_func, 
_get_global_func, PackedFuncBase

Review comment:
       😆 i suppose these lines become useless given you have addressed the 
comments i left before? 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to