Skip to content

Commit

Permalink
[BUGFIX] Fix search path for libtvm_topi.so (#4467)
Browse files Browse the repository at this point in the history
  • Loading branch information
junrushao authored and tqchen committed Dec 4, 2019
1 parent 24713bd commit 6ef2418
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/tvm/_ffi/libinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def find_lib_path(name=None, search_path=None, optional=False):

dll_path = [os.path.realpath(x) for x in dll_path]
if search_path is not None:
if search_path is list:
if isinstance(search_path, list):
dll_path = dll_path + search_path
else:
dll_path.append(search_path)
Expand Down Expand Up @@ -167,7 +167,7 @@ def find_include_path(name=None, search_path=None, optional=False):

header_path = [os.path.abspath(x) for x in header_path]
if search_path is not None:
if search_path is list:
if isinstance(search_path, list):
header_path = header_path + search_path
else:
header_path.append(search_path)
Expand Down
2 changes: 1 addition & 1 deletion topi/python/topi/cpp/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _get_lib_names():
def _load_lib():
"""Load libary by searching possible path."""
curr_path = os.path.dirname(os.path.realpath(os.path.expanduser(__file__)))
lib_search = curr_path
lib_search = [curr_path, os.path.dirname(curr_path)]
lib_path = libinfo.find_lib_path(_get_lib_names(), lib_search, optional=True)
if lib_path is None:
return None, None
Expand Down

0 comments on commit 6ef2418

Please sign in to comment.