Backgroud
After doing some development based on official TVM repository, now we need release our modified TVM to our users, we already have a bigger development tool chain, they are packaged to one Python wheel package, for example our top level tool is named “nn_builder”, because the our modified TVM is a member of “nn_builder”, so we want to put the TVM into “nn_builder”.
Problem
If the tvm directory is put inside “nn_builder”, then lots of TVM original python script will fail like something below.
----> 1 from nn_builder import tvm
~/.local/lib/python3.6/site-packages/nn_builder/tvm/__init__.py in <module>
30 # top-level alias
31 # tvm.runtime
---> 32 from .runtime.object import Object
33 from .runtime.ndarray import device, cpu, cuda, gpu, opencl, cl, vulkan, metal, mtl
34 from .runtime.ndarray import vpi, rocm, ext_dev, hexagon
~/.local/lib/python3.6/site-packages/nn_builder/tvm/runtime/__init__.py in <module>
18
19 # class exposures
---> 20 from .packed_func import PackedFunc
21 from .object import Object
22 from .object_generic import ObjectGeneric, ObjectTypes
~/.local/lib/python3.6/site-packages/nn_builder/tvm/runtime/packed_func.py in <module>
19 """Packed Function namespace."""
20 import ctypes
---> 21 from tvm._ffi.base import _LIB, check_call, c_str, string_types, _FFI_MODE
22
23 try:
ModuleNotFoundError: No module named 'tvm'
I think this issue is a common problem for company who use TVM as a part of their tools, is there a solution for it?
@tqchen @comaniac @junrushao Thanks.