Using the xdputil Tool - 1.4.1 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2021-12-11
Version
1.4.1 English

xdputil is introduced in this release for board development. It can be used for both Edge and Cloud devices. It is pre-installed in the latest board image or docker. The source code of xdputil is located in the Vitis-AI/tools/Vitis-AI-Library/usefultools folder. It contains the following functions.

help
It shows the usage of xdputil.
xdputil --help
status
It shows the status of DPU.
xdputil status
run
Run DPU with the input file. It can be used for DPU cross-checking.
xdputil run <xmodel> [-i <subgraph_index>] <input_bin>

xmodel: The model run on DPU
-i : The subgraph_index of the model, the default value is 0
input_bin: The input file for the model
xmodel
Check the xmodel information. You can convert the xmodel to png/svg/txt formats. Run the following command to show the usage of xmodel.
root@xilinx-zcu102-2021_1:~# xdputil xmodel -h
usage: xdputil.py xmodel [-h] [-l] [-m] [-p [PNG]] [-s [SVG]] [-t [TXT]]
                         xmodel

xmodel

positional arguments:
  xmodel                xmodel file path

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            show subgraph list
  -m, --meta_info       show xcompiler version
  -p [PNG], --png [PNG]
                        the output to png
  -s [SVG], --svg [SVG]
                        the output svg path
  -t [TXT], --txt [TXT]
                        when <txt> is missing, it dumps to standard output.
mem
Read or write memory.
xdputil mem <-r|-w> <addr> <size> <output_file|input_file>
query
Shows device information, including DPU, fingerprint, and Vitis AI version.
xdputil query
benchmark
Performance of the test model.
xdputil benchmark <xmodel> [-i subgraph_index] <num_of_threads>
Note: When you use xdputil in the docker, /usr/bin/python3 -m xdputil is used instead of xdputil. For example,
/usr/bin/python3 -m xdputil query