Some questions about VTA


#1

1.After I finished VTA Simulator Installation, I run all the VTA Tutorial.
When I run resnet.py, I got a wrong result.
Does anyone know the reason?

2.Can I change the number of VTA’s multipliers and adders?

3.And I also want to discuss VTA with someone in Chinese by skype or wechat or other software. If you are willing, you can contact me by message.

4.Will Verilog code be generated after HLS is completed?
If so, how to view it?

Thank you very much!


#2

Hi @foody1228

(1) this is a known bug that happens when using Python 3 - I believe PIL has slightly different implementation between Python 2 and Python 3 so if you try to run it in Python 2, you should get the right answer. @tqchen can confirm this.

(2) this is parameterizable by tweaking VTA’s high level parameters: https://docs.tvm.ai/vta/dev/config.html#parameters-overview For instance you can tweak the BLOCK_IN and BLOCK_OUT to generate a larger matrix multiplication block. If you’re interested in doing so I can elaborate a little more and provide more examples on how to do this correctly.

(3) I don’t speak Chinese, but many folks in our community can help!

(4) Verilog will be generated by HLS, and you have to navigate the hardware build directory under tvm/vta/build/<config>/hls/<module>/solution0/impl/verilog/. Note that this verilog is optimized for Xilinx FPGAs, so it is not a good target for ASICs, or other FPGAs, although it will technically compile.

There is an effort to build a Chisel version of VTA that’s underway.


#3

Hello @thierry
Thank you for your reply very much!
(1)But i ran it in Python2. I type “python --version” and get the result like the following figure.
1127_1
I used “apt-get install python-matplotlib” to install matplotlib before. Is it the reason?
(2)Yes, I am interested in doing so. Can you elaborate more? Thanks!
(3)Is VTA the fixed point hardware? Are its multipliers and adders fixed point operation?
(4)Can I put the quantized model of Mobilenet V2 I have trained by Tensorflow into VTA? If so, how should I do?
(5)Is VTA support zedboard or zcu102? If so, how should I do? I didn’t find that in the document.

Thank you!


#4

(1) I see, it might be a python version independent bug, and instead may depend on the specific implementation of PIL. I’ll need to drill down on this a little more to understand what’s causing the bug.

(2) Actually if you wait for the update of VTA which we’ll upstream soon we’ll release a collection of VTA designs generated from different vta_config.json files. But the idea is that we can explore the space of VTA designs for a given workload by changing the tensor shape, and memory layout directly from the vta_config file. We can also tweak the bit width of the different types. The challenge here is to make sure we don’t exceed FPGA resources, or cause timing violation.

(3) VTA is indeed fixed point hardware, but we could also extend it to support floats. Supporting different numerical representations like unums would require more footwork. If there is interest for a floating point version of VTA, we could start a GitHub Issue and look for contributors, this would actually be quite easy to do. Any volunteers?

(4) This is currently hard to do for two reasons. Mobilenet is not a friendly network for accelerators since they are really tuned for CPU inference. But you can use group-convolutions, which I will also provide support for in the next week or two, which would allow us to support a variant of Mobilenet on VTA. Finally if we want to have a working graph translator, we’ll need to wait on Relay support for VTA which @tqchen is driving.

(5) Zedboard is fairly old, so we don’t have much demand for it. We are releasing support for Ultra-96 and ZCU102, in the 0.5 release (by the end of the year). The challenge with ZCU102, is that it’s not officially supported as a Pynq board, so you’d have to build your own image. You can get started here: https://groups.google.com/forum/#!topic/pynq_project/z4zdtEovD9k


#6

Thank you for your reply very much!
(1)ok, thank you!

(2)ok, when will VTA be updated?

(3)I see, I am more interested in fixed point hardware.

(4)ok, if I want to put my resnet-18 or Mobilenet V2 that I’ve trained into VTA, how should I do?

(5)ok, I am going to start with pynq-z1.

Thank you!