Error: VTARuntimeShutdown symbol is undefined

Hi, I tried some tutorials(deploy_detection, deploy_classification, etc) using PYNQ Z1 Board.

However, I got the same problem for all the tutorials I ran, on RPC server.

 File "/home/xilinx/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 78, in cfun
    rv = local_pyfunc(*pyargs)
  File "/home/xilinx/tvm/vta/python/vta/exec/rpc_server.py", line 84, in server_shutdown
    runtime_dll[0].VTARuntimeShutdown()
  File "/usr/lib/python3.6/ctypes/__init__.py", line 361, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.6/ctypes/__init__.py", line 366, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /home/xilinx/tvm/vta/python/vta/../../../build/libvta.so: undefined symbol: VTARuntimeShutdown

I searched this Error and found this error was recently solved on VTA build and execution error with new 3rdparty vta-hw, but still I have the error.

My OS’s PYNQ v2.5, and I use the latest commit of TVM(a072da0588c542757d2815832b7f010f530b2428)

I would really appreciate if someone let me know why the error happened. Is there anyone who solved this error?

Have you confirmed that both TVM installs (on pynq and on your host) are up to date?

Yes, both TVM are the same version(a072da0588c542757d2815832b7f010f530b2428), which is updated May 28, 2020.

Ok, I’ll try to reproduce the tutorial on the latest TVM. Did you get the bug after updating TVM, or did you install from a fresh git clone?

I installed both TVM from a fresh git clone

Thank you for your attention!

I am facing same issue while running vta on de10 nano. Is this bug solved yet or not?

it would be great to add debug statements around the line https://github.com/apache/incubator-tvm/blob/e561007f0c330e3d14c2bc8a3ef40fb741db9004/vta/python/vta/exec/rpc_server.py#L84 to see what symbols are exposed. VTARuntimeShutdown is indeed defined in https://github.com/apache/incubator-tvm/blob/main/vta/runtime/runtime.h#L74

I’ve encountered the same problem with commit ‘da42924a16c5e688bbb31facb3b17ba066b776df’ (2/2 2021)

Check the build directory, I found a ‘T’ symbol in CMakeFiles/vta.dir/vta/runtime/runtime.cc.o, but was not appeared within the final libvta.so

I tried to rerun the link command in CMakeFiles/vta.dir/link.txt, aka

‘/usr/bin/c++ -fPIC -std=c++14 -faligned-new -O2 -Wall -fPIC -shared -Wl,-soname,libvta.so -o libvta.so CMakeFiles/vta.dir/vta/runtime/device_api.cc.o CMakeFiles/vta.dir/vta/runtime/runtime.cc.o CMakeFiles/vta.dir/3rdparty/vta-hw/src/pynq/pynq_driver.cc.o -lcma’

This error disappeared.

5 Likes

@cee1 It also worked for me. I ran test_benchmark_topi_conv2d.py in the tutorial with PYNQ Z1 (v2.5). Thank you so much!

thank you so much! It really works! I also successfully ran the test_benchmark_topi_conv2d.py in the tutorial on PYNQ-Z2.

@cee1 Thank you! It resolved this issue for me as well

@cee1 . Thanks for your inputs its worked for me. I am using zcu104 with pynq image 2.6. After the build on the board side ,

  1. I ran “sudo chmod 777 CMakeFiles/vta.dir/link.txt” otherwise it throws permission denied.
  2. Then run “CMakeFiles/vta.dir/link.txt”

make sure that in the build directory you the following files :

  1. CMakeFiles/vta.dir/vta/runtime/device_api.cc.o
  2. CMakeFiles/vta.dir/vta/runtime/runtime.cc.o
  3. CMakeFiles/vta.dir/3rdparty/vta-hw/src/pynq/pynq_driver.cc.o

in my case the last 3rd party directory was missing. if any thing missed in the directory then clean and remove everything from build directory expect " config.cmake" file.

then after build is complete rerun the link.txt file.

Hello, I am building the latest TVM0.9 on the pynq-z2 development board, and I get an error: VTARuntimeShutdown, I have repeated the build many times, but the same problem occurs. . . . . What do you mean by “run “CMakeFiles/vta.dir/link.txt””, can you elaborate? Looking forward to your reply! ! !

Dear @okkk ,

Hello, I hope you resolved it. I was not active that’s why i didn’t get back to you. If you have not resolved it simply run the command ‘CMakeFiles/vta.dir/link.txt’ from the build directory.

Kind Regards, Harish

@cee1

Awesome! It worked for me. I ran test_benchmark_gemm.py and test_benchmark_topi_conv2d.py in the tutorial with PYNQ Z1 (v2.6). Thanks :100: