Which files should i modify to port VTA in a ZCU102?

Hi, I have been trying to deploy VTA on a ZCU102 Board, i know that has been done before :slight_smile:

Does @thierry or anyone else have a porting procedure or at least the list of files that need to be modified ?

What i have done so far :

  • I’ve built PYNQ 2.5 for ZCU102. (working correctly)

  • Modified vtaconf.json and pkg_conf files to generate VTA bitstreams for ZCU102. (seems to be working correctly)

  • Modified RPC servers to handle my target. (not working)

  • I am currently getting this error when trying to run RPC server test :

Traceback (most recent call last):
  File "test_program_rpc.py", line 47, in <module>
    reconfig_rpc_runtime()
  File "test_program_rpc.py", line 43, in reconfig_rpc_runtime
    reconfig_runtime(remote)
  File "/home/rass/PhD/zcu102/tvm/vta/python/vta/rpc_client.py", line 36, in reconfig_runtime
    freconfig(env.pkg.cfg_json)
  File "tvm/_ffi/_cython/./packed_func.pxi", line 331, in tvm._ffi._cy3.core.PackedFuncBase.__call__
  File "tvm/_ffi/_cython/./packed_func.pxi", line 262, in tvm._ffi._cy3.core.FuncCall
  File "tvm/_ffi/_cython/./packed_func.pxi", line 251, in tvm._ffi._cy3.core.FuncCall3
  File "tvm/_ffi/_cython/./base.pxi", line 181, in tvm._ffi._cy3.core.CHECK_CALL
tvm.error.RPCError: Traceback (most recent call last):
  4: TVMFuncCall
  3: tvm::runtime::RPCWrappedFunc::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
  2: tvm::runtime::RPCClientSession::CallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::TVMArgs)> const&)
  1: tvm::runtime::RPCEndpoint::CallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::TVMArgs)>)
  0: tvm::runtime::RPCEndpoint::HandleUntilReturnEvent(bool, std::function<void (tvm::runtime::TVMArgs)>)
  9: TVMFuncCall
  8: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#2}> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
  7: tvm::runtime::RPCServerLoop(int)
  6: tvm::runtime::RPCEndpoint::ServerLoop()
  5: tvm::runtime::RPCEndpoint::HandleUntilReturnEvent(bool, std::function<void (tvm::runtime::TVMArgs)>)
  4: tvm::runtime::RPCEndpoint::EventHandler::HandleNextEvent(bool, bool, std::function<void (tvm::runtime::TVMArgs)>)
  3: tvm::runtime::RPCEndpoint::EventHandler::HandleProcessPacket(std::function<void (tvm::runtime::TVMArgs)>)
  2: tvm::runtime::RPCSession::AsyncCallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::RPCCode, tvm::runtime::TVMArgs)>)
  1: tvm::runtime::LocalSession::CallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::TVMArgs)> const&)
  0: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<TVMFuncCreateFromCFunc::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#2}> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
  File "/home/xilinx/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 81, in cfun
    rv = local_pyfunc(*pyargs)
  File "/home/xilinx/tvm/vta/python/vta/exec/rpc_server.py", line 121, in reconfig_runtime
    cc.create_shared(lib_name, source, cflags + ldflags)
  File "/home/xilinx/tvm/python/tvm/contrib/cc.py", line 79, in create_shared
    _linux_compile(output, objects, options, cc, compile_shared=True)
  File "/home/xilinx/tvm/python/tvm/contrib/cc.py", line 247, in _linux_compile
    raise RuntimeError(msg)
  File "/home/rass/PhD/tvm/src/runtime/rpc/rpc_endpoint.cc", line 376
RPCError: Error caught from RPC call:
RuntimeError: Compilation error:
g++: fatal error: no input files
compilation terminated.

Command line: /usr/bin/g++ -shared -fPIC -o /home/xilinx/tvm/vta/python/vta/../../../build/libvta.so -O2 -std=c++17 -I/home/xilinx/tvm/include -I/home/xilinx/tvm/3rdparty/vta-hw/include -I/home/xilinx/tvm/3rdparty/dlpack/include -I/home/xilinx/tvm/3rdparty/dmlc-core/include -DVTA_TARGET=zcu102 -DVTA_HW_VER=0.0.2 -DVTA_LOG_INP_WIDTH=3 -DVTA_LOG_WGT_WIDTH=3 -DVTA_LOG_ACC_WIDTH=5 -DVTA_LOG_BATCH=0 -DVTA_LOG_BLOCK=4 -DVTA_LOG_UOP_BUFF_SIZE=15 -DVTA_LOG_INP_BUFF_SIZE=15 -DVTA_LOG_WGT_BUFF_SIZE=18 -DVTA_LOG_ACC_BUFF_SIZE=17 -DVTA_LOG_BLOCK_IN=4 -DVTA_LOG_BLOCK_OUT=4 -DVTA_LOG_OUT_WIDTH=3 -DVTA_LOG_OUT_BUFF_SIZE=15 -DVTA_LOG_BUS_WIDTH=7 -DVTA_IP_REG_MAP_RANGE=0x1000 -DVTA_FETCH_ADDR=0xA0000000 -DVTA_LOAD_ADDR=0xA0001000 -DVTA_COMPUTE_ADDR=0xA0002000 -DVTA_STORE_ADDR=0xA0003000 -DVTA_FETCH_INSN_COUNT_OFFSET=16 -DVTA_FETCH_INSN_ADDR_OFFSET=24 -DVTA_LOAD_INP_ADDR_OFFSET=16 -DVTA_LOAD_WGT_ADDR_OFFSET=24 -DVTA_COMPUTE_DONE_WR_OFFSET=16 -DVTA_COMPUTE_DONE_RD_OFFSET=24 -DVTA_COMPUTE_UOP_ADDR_OFFSET=32 -DVTA_COMPUTE_BIAS_ADDR_OFFSET=40 -DVTA_STORE_OUT_ADDR_OFFSET=16 -DVTA_COHERENT_ACCESSES=true