Vta_get_started.py can't finish on ultra96 platform

Hello all , recently I tried to run the “tvm/vta/tutorials/vta_get_started.py” on my ultra96 pynq platform. I found that vta_get_started.py would stuck at somewhere, then I tried to insert printf info into the TVM source code ,such as “/home/xilinx/jupyter_notebooks/tvm_vta/tvm/3rdparty/vta-hw/src/pynq/pynq_driver.cc”. Next I got the seruceCRT output like this below:

It seems that it stucked at the line 137 in the following code:

The seruceCRT couldn’t echo anything and I think the pynq OS was crashed.

I’ve tried some ways to solve this problem . I found that if I used the Overlay package of pynq to download the vta.bit ( overlay = pynq.Overlay("/home/xilinx/jupyter_notebooks/tvm_vta/vta.bit") )and then ran the vta_get_started.py again, the seruceCRT output would enter the for loop at line 157 to line 161 of the second figure above. And the secureCRT can still echo my keyboard , I think the pynq OS was still work. After the for loop number exceed the wait_cycles, it would print " Leave Run in pynq_driver.cc". The echo info of secureCRT was below:

Then the python console of running vta_get_started.py would give info below:

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)>) 12: 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*) 11: tvm::runtime::RPCServerLoop(int) 10: tvm::runtime::RPCEndpoint::ServerLoop() 9: tvm::runtime::RPCEndpoint::HandleUntilReturnEvent(bool, std::function<void (tvm::runtime::TVMArgs)>) 8: tvm::runtime::RPCEndpoint::EventHandler::HandleNextEvent(bool, bool, std::function<void (tvm::runtime::TVMArgs)>) 7: tvm::runtime::RPCEndpoint::EventHandler::HandleProcessPacket(std::function<void (tvm::runtime::TVMArgs)>) 6: tvm::runtime::RPCSession::AsyncCallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::RPCCode, tvm::runtime::TVMArgs)>) 5: tvm::runtime::LocalSession::CallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::TVMArgs)> const&) 4: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::WrapPackedFunc(int ()(TVMValue, int*, int, TVMValue*, int*, void*), tvm::runtime::ObjectPtrtvm::runtime::Object const&)::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) 3: 0x0000007fb6c02e37 2: 0x0000007fb6c03223 1: 0x0000007fb6c22fd7 0: 0x0000007fb6c2a073 File “/home/lishen/TVM/tvm/src/runtime/rpc/rpc_endpoint.cc”, line 390 RPCError: Error caught from RPC call: [21:22:07] /home/xilinx/jupyter_notebooks/tvm_vta/tvm/vta/runtime/runtime.cc:1158: Check failed: timeout == 0 (1 vs. 0) :

I think the pynq_dirver.cc didn’t receive the done signal from the vta.bit.

In all ,there are two questions that confuse me:

  1. why the original way of TVM to download bitstream seems like didn’t work and crash my pynq os when try to wirte the reg of vta?
  2. after I change to Overlay API to download bitstream , why the vta.bit couldn’t give done signal?

Thank you for any suggestions.