tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Bug] [VTA, RPC] Can’t upload custom bit file by RPC on ZCU104

Open muonkmu opened this issue 1 year ago • 1 comments

I am testing VTA in the following environment.

Target : ZCU104 (pynq 2.7) Host : ubuntu 20.04 + TVM(v0.16,dev0) xilinx toos : vivado 2020.1

I successfully synthesized the “vta.bit” file for ZCU104, and successfully launched the RPC server on ZCU104. However, if I try to upload “vta.bit” using “vta.program_fpga (remote, bitstream=“vta.bit”)”, the following error occurs.

Which version of TVM and Pynq are guaranteed compatibility Is there a solution for this?

Traceback (most recent call last):
  File "Simple_Matrix_Multiply.py", line 24, in <module>
    vta.program_fpga(remote, bitstream="vta.bit")
  File "/home/minwook/Workspace/Study_lab/71_tvm/tvm/vta/python/vta/rpc_client.py", line 66, in program_fpga
    fprogram(os.path.basename(bitstream))
  File "/home/minwook/Workspace/Study_lab/71_tvm/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 239, in __call__
    raise_last_ffi_error()
  File "/home/minwook/Workspace/Study_lab/71_tvm/tvm/python/tvm/_ffi/base.py", line 481, in raise_last_ffi_error
    raise py_err
tvm.error.RPCError: Traceback (most recent call last):
  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)>)
  File "/home/minwook/Workspace/Study_lab/71_tvm/tvm/src/runtime/rpc/rpc_endpoint.cc", line 427
RPCError: Error caught from RPC call:

muonkmu avatar Mar 27 '24 01:03 muonkmu

Hi @muonkmu, I'm facing the same error, but with a newer pynq version:

Target : ZCU104 ( Pynq: 3.0.1) TVM v0.18.dev0 xilinx toos : vivado 2020.1

I haven't found information about which versions of TVM and Pynq are compatibility. What I'm going to do now is flash the SD with the pynq 2.5 image for the ZCU104, since in the tutorial they use that version for the PYNQ-Z1 card: https://tvm.apache.org/docs/topic/vta/install.html#xilinx-pynq-fpga-setup.

Anyway, did you find a solution for this?

AdrFebles avatar Oct 08 '24 09:10 AdrFebles