hi ,
i am trying to add support for custom hardware through BYOC. the calls in generated C code is dependent on some external libraries which are sitting in some folder outside of TVM.
I have added custom.cmake file which has all the required external .so files and their inclusion by appending them to “TVM_RUNTIME_LINKER_LIBS” which helps me building the tvm with my codegen.
Problem comes when i import TVM in python , its when i come across this error:
File "/home/user/sait-ubuntu-workspace/tvm-workspace/tvm/python/tvm/__init__.py", line 26, in <module>
from ._ffi.base import TVMError, __version__, _RUNTIME_ONLY
File "/home/user/sait-ubuntu-workspace/tvm-workspace/tvm/python/tvm/_ffi/__init__.py", line 28, in <module>
from .base import register_error
File "/home/user/sait-ubuntu-workspace/tvm-workspace/tvm/python/tvm/_ffi/base.py", line 71, in <module>
_LIB, _LIB_NAME = _load_lib()
File "/home/user/sait-ubuntu-workspace/tvm-workspace/tvm/python/tvm/_ffi/base.py", line 57, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libhsakmt.so.1: cannot open shared object file: No such file or directory
as the error suggests , tvm is not able to figure out the location of external lib “libhsakmt.so” ,
so my question is how can we make tvm search through some user defined location for required linked external lib.
Any help would be highly appreciated. Thanks