TVMMemAlloc gives error in VTA device

The memory allocation gives error while running on the pynq device. I have configured a zedboard as a pynq device. It gives the following error in the rpc session.

Traceback (most recent call last):
File “vta/tutorials/vta_get_started.py”, line 350, in
A_nd = tvm.nd.array(A_packed, ctx)
File “/home/sarbartha/Work/tvm/python/tvm/ndarray.py”, line 199, in array
return empty(arr.shape, arr.dtype, ctx).copyfrom(arr)
File “/home/sarbartha/Work/tvm/python/tvm/_ffi/ndarray.py”, line 113, in empty
ctypes.byref(handle)))
File “/home/sarbartha/Work/tvm/python/tvm/_ffi/base.py”, line 66, in check_call
raise TVMError(py_str(_LIB.TVMGetLastError()))
tvm._ffi.base.TVMError: Except caught from RPC call: [19:24:00] /home/xilinx/tvm/vta/src/runtime.cc:68: Check failed: data != nullptr

Stack trace returned 10 entries:
[bt] (0) /home/xilinx/tvm/build/libtvm_runtime.so(dmlc::StackTraceabi:cxx11+0x107) [0x35d04320]
[bt] (1) /home/xilinx/tvm/vta/python/vta/…/…/…/build/libvta.so(VTABufferAlloc+0x191) [0x35962dd6]
[bt] (2) /home/xilinx/tvm/build/libtvm_runtime.so(tvm::runtime::RPCDevAllocData(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)+0x89) [0x35d2e18a]
[bt] (3) /home/xilinx/tvm/build/libtvm_runtime.so(void tvm::runtime::RPCSession::EventHandler::CallHandler<void ()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue)>(void ()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue))+0x4f) [0x35d32898]
[bt] (4) /home/xilinx/tvm/build/libtvm_runtime.so(tvm::runtime::RPCSession::EventHandler::HandlePackedCall()+0x23d) [0x35d2e536]
[bt] (5) /home/xilinx/tvm/build/libtvm_runtime.so(tvm::runtime::RPCSession::EventHandler::SwitchToState(tvm::runtime::RPCSession::EventHandler::State)+0x1d9) [0x35d32ca6]
[bt] (6) /home/xilinx/tvm/build/libtvm_runtime.so(tvm::runtime::RPCSession::EventHandler::HandleRecvPackedSeqArg()+0x241) [0x35d33a4a]
[bt] (7) /home/xilinx/tvm/build/libtvm_runtime.so(tvm::runtime::RPCSession::EventHandler::HandleNextEvent(tvm::runtime::TVMRetValue*, bool, tvm::runtime::PackedFunc const*)+0x197) [0x35d33ea8]
[bt] (8) /home/xilinx/tvm/build/libtvm_runtime.so(tvm::runtime::RPCSession::HandleUntilReturnEvent(tvm::runtime::TVMRetValue*, bool, tvm::runtime::PackedFunc const*)+0xfb) [0x35d2f954]
[bt] (9) /home/xilinx/tvm/build/libtvm_runtime.so(tvm::runtime::RPCSession::ServerLoop()+0x9f) [0x35d2fb30]

Can you please help me with this.

is there an error stack trace on the pynq side that you could share? did you make sure to run the rpc server with sudo?

Plz close it. The xlnk driver was not included properly in the kernel.

ok - I presume that this was a v2.1 -> v2.3 error and it should have been fixed here: https://github.com/dmlc/tvm/pull/1945