[build] how to get the tvm execute binary ?

According https://tvm.hyper.ai/docs/install/from_source I try the following commands

 git clone --recursive https://github.com/apache/tvm tvm
 mkdir build
cp cmake/config.cmake build
cd build
cmake ..
make -j4

Only get 3 libraries libtvm_runtime.so/libtvm.so/libtvm_allvisible.so, so it missing the tvm execute binary ?

[100%] Linking CXX shared library libtvm_runtime.so
[100%] Built target tvm_runtime
[100%] Built target tvm_objs
[100%] Linking CXX shared library libtvm.so
[100%] Linking CXX shared library libtvm_allvisible.so
[100%] Built target tvm
[100%] Built target tvm_allvisible

TVM does not provide executable binary, please see quick start to see how to use it :slight_smile:

1 Like
(venv) [root@huawei-pc source]# cat test.py 
import tvm
from tvm import relax
from tvm.relax.frontend import nn


class MLPModel(nn.Module):
    def __init__(self):
        super(MLPModel, self).__init__()
        self.fc1 = nn.Linear(784, 256)
        self.relu1 = nn.ReLU()
        self.fc2 = nn.Linear(256, 10)

    def forward(self, x):
        x = self.fc1(x)
        x = self.relu1(x)
        x = self.fc2(x)
        return x
  • then I use TVM_LIBRARY_PATH to specified the path of above libraries libtvm_runtime.so/libtvm.so/libtvm_allvisible.so, it reports missing tvm module, need any extra configuration ?

It works fine with export PYTHONPATH=/home/zhongyunde/tvm/python

refer to: [Bug] No module named 'tvm' after specifing the TVM dynamic library · Issue #3072 · mlc-ai/mlc-llm · GitHub