vacu9708 commented on code in PR #17808:
URL: https://github.com/apache/tvm/pull/17808#discussion_r2040683891
##########
python/tvm/_ffi/libinfo.py:
##########
@@ -143,8 +143,18 @@ def find_lib_path(name=None, search_path=None,
optional=False):
]
name = lib_dll_names + runtime_dll_names + ext_lib_dll_names
- lib_dll_path = [os.path.join(p, name) for name in lib_dll_names for p
in dll_path]
- runtime_dll_path = [os.path.join(p, name) for name in
runtime_dll_names for p in dll_path]
+ lib_dll_path = [
+ os.path.join(p, name)
+ for name in lib_dll_names
+ for p in dll_path
+ if "python/tvm" not in p
+ ]
+ runtime_dll_path = [
+ os.path.join(p, name)
+ for name in runtime_dll_names
+ for p in dll_path
+ if "python/tvm" not in p
Review Comment:
Your opinion sounds good for better readability.
dll_path contains absolute paths, so "python/tvm" is at the end of the path.
I used endswith() instead.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]