Cross compile raspberry pi 4b(No available targets...)

Hi,

I am trying to cross compile my code to run on raspberry pi 4b and it seems like I am getting errors from setting the compilation target incorrectly.I encountered a problem while running the official sample code (I have modified the relevant configuration according to the official prompts),the link is

I currently have

local_demo = False

if local_demo: target = “llvm” else: target = “llvm -mtriple=aarch64-linux-gnu”

Error reported on the next line of the code:

func = tvm.build(s, [A, B], target=target, name=“add_one”)

For more information, below is the detailed error message:

Traceback (most recent call last): File “/snap/pycharm-community/332/plugins/python-ce/helpers/pydev/pydevd.py”, line 1496, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File “/snap/pycharm-community/332/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py”, line 18, in execfile exec(compile(contents+"\n", file, ‘exec’), glob, loc) File “/home/allen/tvmspace/code/cross_compilation_and_rpc.py”, line 122, in func = tvm.build(s, [A, B], target=target, name=“add_one”) File “/home/allen/.local/lib/python3.8/site-packages/tvm-0.13.dev136+g00b41c63e-py3.8-linux-x86_64.egg/tvm/driver/build_module.py”, line 281, in build rt_mod_host = _driver_ffi.tir_to_runtime(annotated_mods, target_host) File “/home/allen/.local/lib/python3.8/site-packages/tvm-0.13.dev136+g00b41c63e-py3.8-linux-x86_64.egg/tvm/_ffi/_ctypes/packed_func.py”, line 238, in call raise get_last_ffi_error() tvm._ffi.base.TVMError: Traceback (most recent call last): 6: TVMFuncCall 5: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::runtime::Module (tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, tvm::Target)>::AssignTypedLambda<tvm::{lambda(tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, tvm::Target)#6}>(tvm::{lambda(tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, tvm::Target)#6}, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, tvm::runtime::TVMRetValue) 4: tvm::TIRToRuntime(tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, tvm::Target const&) 3: tvm::codegen::Build(tvm::IRModule, tvm::Target) 2: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::runtime::Module (tvm::IRModule, tvm::Target)>::AssignTypedLambda<tvm::codegen::{lambda(tvm::IRModule, tvm::Target)#6}>(tvm::codegen::{lambda(tvm::IRModule, tvm::Target)#6}, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, tvm::runtime::TVMRetValue) 1: tvm::codegen::LLVMModuleNode::Init(tvm::IRModule const&, tvm::Target const&) 0: tvm::codegen::LLVMTargetInfo::GetOrCreateTargetMachine(bool) File “/home/allen/tvmspace/tvm/src/target/llvm/llvm_instance.cc”, line 302 TVMError:

An error occurred during the execution of TVM. For more information, please see: Handle TVM Errors — tvm 0.13.dev0 documentation

Check failed: (target_machine_ != nullptr) is false: No available targets are compatible with triple “aarch64-linux-gnu”