This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/master by this push:
new 291f4dc [Bugfix] Fix Python debugger segfaults with TVM built with
LLVM (#5685)
291f4dc is described below
commit 291f4dc8bb41a69805036b9d5eeb3ba3690d1812
Author: Junru Shao <[email protected]>
AuthorDate: Wed May 27 13:50:56 2020 -0700
[Bugfix] Fix Python debugger segfaults with TVM built with LLVM (#5685)
* Import readline before loading libtvm
* make lint happy
---
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 8674e31..2cca014 100644
--- a/python/tvm/_ffi/base.py
+++ b/python/tvm/_ffi/base.py
@@ -51,6 +51,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