mshr-h commented on PR #17808: URL: https://github.com/apache/tvm/pull/17808#issuecomment-2791646328
It’s probably due to the search priority of `dll_path` in the `get_dll_directories()` function in [`python/tvm/_ffi/libinfo.py`](https://github.com/apache/tvm/blob/main/python/tvm/_ffi/libinfo.py#L43). For some reason, when a shared object already exists under `python/tvm/`, that shared object is chosen as the source for copying that causes the SameFileError. It worked by increasing the priority of the build directory. Changin from this ```python # Pip lib directory dll_path.append(os.path.join(ffi_dir, "..")) # Default cmake build directory dll_path.append(os.path.join(source_dir, "build")) dll_path.append(os.path.join(source_dir, "build", "Release")) # Default make build directory dll_path.append(os.path.join(source_dir, "lib")) ``` to this (prioritize build directory over pip lib directory) ```python # Default cmake build directory dll_path.append(os.path.join(source_dir, "build")) dll_path.append(os.path.join(source_dir, "build", "Release")) # Default make build directory dll_path.append(os.path.join(source_dir, "lib")) # Pip lib directory dll_path.append(os.path.join(ffi_dir, "..")) ``` -- 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]
