Unverified Commit c85bb3ac authored by Lei Wang's avatar Lei Wang Committed by GitHub
Browse files

[Bugfix] Fix tvm import path for editable build (#1172)

parent 13bdcd60
......@@ -16,7 +16,7 @@ def test_let_vectorize_load():
mod = tvm.IRModule({"main": main})
mod = tvm.compile(mod, target="cuda")
assert "float4 b" in mod.mod.imported_modules[0].get_source()
assert "float4 b" in mod.mod.imports[0].inspect_source()
if __name__ == "__main__":
......
......@@ -297,12 +297,11 @@ def prepend_pythonpath(path):
if env.TVM_IMPORT_PYTHON_PATH is not None:
prepend_pythonpath(env.TVM_IMPORT_PYTHON_PATH)
else:
tvm_path = os.path.join(THIRD_PARTY_ROOT, "tvm")
tvm_path = os.path.join(THIRD_PARTY_ROOT, 'tvm', 'python')
assert os.path.exists(tvm_path), tvm_path
if tvm_path not in sys.path:
tvm_python_binding = os.path.join(tvm_path, 'python')
prepend_pythonpath(tvm_python_binding)
env.TVM_IMPORT_PYTHON_PATH = tvm_python_binding
prepend_pythonpath(tvm_path)
env.TVM_IMPORT_PYTHON_PATH = tvm_path
if os.environ.get("TVM_LIBRARY_PATH") is None:
os.environ['TVM_LIBRARY_PATH'] = env.TVM_LIBRARY_PATH = os.pathsep.join(TL_LIBS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment