Hey! Since you are working on a PYNQ board can you help me with setting up things. I have a ImportError problem.
I’m very new to tvm and as the first steps I followed the vta installation guide specifed below to setup my Xilinx PYNQ-Z1 board with tvm to run an example first.
VTA Installation Guide
As per this guide I cloned tvm to the SD card of my Xilinx PYNQ board and followed each and every step precisely. Finally I started the RPC server with the line :sudo ./apps/vta_rpc/start_rpc_server.sh and left that terminal where the RPC server is running aside and opened another terminal. In that terminal with “ssh xilinx@192.168.2.99” I logged in to the board and followed the section in the guide named “Testing your PYNQ based hardware setup”.
There at the end when I ran the line : python vta/tests/python/pynq/test_program_rpc.py
I end up with the ImportError: No module named tvm. Can anyone please help me with this problem?
Screenshot:
First off, the test_program_rpc.py script has to be run on your host machine, not on the PYNQ board.
Citing the documentation:
# On the Host-sidepython <tvm root>/vta/tests/python/pynq/test_program_rpc.py
The error No module named tvm is probably because of a wrong PYTHONPATH. Make sure that the PYTHONPATH on you PYNQ board contains /home/xilinx/tvm/python. You can check this with echo $PYTHONPATH. If it doesn’t contain the above mentioned path, put export PYTHONPATH=$HOME/tvm/python:$HOME/tvm/vta/python:$PYTHONPATH in ~/.bashrc and source it.
@flip1995 I’m glad the issue was resolved! Would you mind adding a tutorial to the website for people who might want to run the FPGA examples without going through RPC? I’d be happy to guide you through the process of extending our tutorials.
Yeah, I’ll do that. But I’m currently swamped with my master thesis, so it will take me some time to get to this. Should we create a github issue and assign me, so I don’t forget about it?
Sadly not. I never got to write the tutorial. And now I didn’t use TVM with a FPGA card in 1 ½ years and neither have access to one. So I’m not sure if this still works and I don’t feel qualified to write the tutorial anymore.
I recommend that you follow the VTA tutorials that deploy the model over RPC and then write a python script similar to what you would do on a raspi/jetson/… and add the two lines to load the shared library.