For Edge (DPUv2) - For Edge (DPUv2) - 1.1 English - UG1414

Vitis AI User Guide (UG1414)

Document_ID
UG1414
Release_Date
2020-03-23
Version
1.1 English

Use the following steps to set up the host for edge:

  1. Download the sdk.sh from here.
  2. Install the cross-compilation system environment.
    $./sdk.sh
  3. Follow the prompts to install. The following figure shows the installation process.

    Note that the ~/petalinux_sdk path is recommended for installation. Regardless of the path you choose for the installation, make sure the path you choose has re-write permissions. Here, install it under ~/petalinux_sdk.

  4. When the installation is complete, follow the prompts and enter the following command.
    $ . ~/petalinux_sdk/environment-setup-aarch64-xilinx-linux

    Note that if you close the current terminal, you need to re-execute the above instructions in the new terminal interface.

  5. Download the vitis_ai_2019.2-r1.1.0.tar.gz from https://github.com/Xilinx/Vitis-AI and install it to the petalinux system.
    $tar -xzvf vitis_ai_2019.2-r1.1.0.tar.gz -C ~/petalinux_sdk/sysroots/aarch64-xilinx-linux
  6. Update the glog to v0.4.0.
    1. Download the glog package and untar it.
      $cd ~
      $curl -Lo glog-v0.4.0.tar.gz https://github.com/google/glog/archive/v0.4.0.tar.gz
      $tar -zxvf glog-v0.4.0.tar.gz
      $cd glog-0.4.0
    2. Build it and install it to the petalinux system.
      $mkdir build_for_petalinux
      $cd build_for_petalinux
      $unset LD_LIBRARY_PATH; source ~/petalinux_sdk/environment-setup-aarch64-xilinx-linux
      $cmake -DCPACK_GENERATOR=TGZ -DBUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=$OECORE_TARGET_SYSROOT/usr ..
      $make && make install
      $make package
  7. Clone the Vitis AI repository:
    $cd ~
    $Git clone https://github.com/xilinx/vitis-ai
  8. Cross compile the sample, take resnet50 as an example.
    $cd ~/vitis-ai/vart/samples/resnet50
    $bash –x build.sh

    If the compilation process does not report any error and the executable file resnet50 is generated, the host environment is installed correctly.