I want to build a model end-2-end like:
import numpy as np
import tvm
from tvm import relay, auto_scheduler
import tvm.relay.testing
from tvm.contrib import graph_executor
import os
import tvm.contrib.hexagon as hexagon
import onnx
from tvm.contrib import utils, ndk
onnx_model = onnx.load(“mobilenetv2.onnx”)
path_lib = “./mobilenetv2.so”
os.environ[“TVM_NDK_CC”] = “tools/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang++”
mod, params = relay.frontend.from_onnx(onnx_model, {“x”: (1, 3, 224, 224)})
target = tvm.target.hexagon(“v66”, hvx=0)
with tvm.transform.PassContext(opt_level=3):
lib = relay.build(mod, target, params=params)
lib.export_library(path_lib, ndk.create_shared)
But failed:
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
@sanirudh @srkreddy1238 @tqchen @kparzysz