This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch v0.6
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/v0.6 by this push:
new d1a2268 [BACKPORT-0.6][BUGFIX] Fix Python debugger segfaults with TVM
built with LLVM (#5837)
d1a2268 is described below
commit d1a226840bd91384388aeba5607c8fd58f714919
Author: Junru Shao <[email protected]>
AuthorDate: Wed Jun 17 13:44:30 2020 -0700
[BACKPORT-0.6][BUGFIX] Fix Python debugger segfaults with TVM built with
LLVM (#5837)
---
python/tvm/_ffi/base.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/python/tvm/_ffi/base.py b/python/tvm/_ffi/base.py
index c61c5c4..39d211b 100644
--- a/python/tvm/_ffi/base.py
+++ b/python/tvm/_ffi/base.py
@@ -54,6 +54,11 @@ def _load_lib():
lib.TVMGetLastError.restype = ctypes.c_char_p
return lib, os.path.basename(lib_path[0])
+try:
+ import readline # pylint: disable=unused-import
+except ImportError:
+ pass
+
# version number
__version__ = libinfo.__version__
# library instance of nnvm