cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dait
Newbie
Newbie
242 Views
Registered: ‎03-02-2021

Vitis AI - Building hardware image for AWS F1 from tutorial Machine Learning models

Spoiler
I am trying to build a hardware image for AWS. I have read the Vitis AI 1.3 user guide and run the tutorial on 02-MNIST_classification https://github.com/Xilinx/Vitis-Tutorials/tree/master/Machine_Learning/Design_Tutorials/02-MNIST_classification_tf

I can generate successfully the steps 0 to 7 including the build to target U50.

However, I wonder how the .xmodel can be compiled into an .xclbin to be able to run onto AWS F1 and test the actual model on hardware. Please advise.
0 Kudos
4 Replies
chaoz
Xilinx Employee
Xilinx Employee
221 Views
Registered: ‎09-14-2018

Hi @dait 

.xmodel is model file and .xclbin is hardware overlay file. These are differenct files.

.xmodel cannot  be compiled into an .xclbin

----------------------------------------------------------------------------------------------
Don't forget to "Accept as solution" or "Kudo" if it helps. Thanks!
----------------------------------------------------------------------------------------------

 

 

0 Kudos
dait
Newbie
Newbie
195 Views
Registered: ‎03-02-2021

Thanks for the precision. So how can we benefit from hardware acceleration if we cannot compile ?

Do we need to go through HLS or is FINN the only way ?

0 Kudos
jheaton
Xilinx Employee
Xilinx Employee
159 Views
Registered: ‎03-21-2008

Since you have already compiled for the U50, you could try running on the Nimbix cloud.  They do have U50s with the Vitis-AI runtime installed:

https://www.nimbix.net/alveo

0 Kudos
ndujar
Visitor
Visitor
114 Views
Registered: ‎12-16-2020

Hi @dait I am having similar issues.

Recently they have updated the documentation of the Vitis-AI repo.

There one can find detailed instructions on how to setup an AWS instance for Vitis AI (beware, you may need to go with a 64GB disk. The default 8GB is not enough).

Once you have it up and running, the tutorial is still not totally valid, because the scripts are too specific.

You need to modify the U50_overlay.sh script and provide the path given in the instructions (i.e):

wget https://www.xilinx.com/bin/public/openDownload?filename=dpu-aws.xclbin -O dpu-aws.xclbin
sudo mkdir -p /opt/xilinx/overlaybins/dpuv3int8
sudo cp dpu-aws.xclbin /opt/xilinx/overlaybins/dpuv3int8
sudo chmod -R a+r /opt/xilinx/overlaybins/dpuv3int8

 

That is your .xclbin.

I am still unsure as how the hbm_address_assignment.txt goes (probably not needed in this case).

Hope this helps

0 Kudos