For Data Center (Versal V70 Card) - 3.5 English

Vitis AI Library User Guide (UG1354)

Document ID
Release Date
3.5 English
To run an example for the Versal V70 card, use these steps:
  1. After downloading the Vitis AI Library, navigate to the Vitis-AI directory, and then start Docker.
  2. Enter the directory of the sample and then compile it. Take resnet50_pt as an example.
    cd /workspace/examples/vai_library/samples/classification
    bash -x
  3. Run the sample.
    ./test_jpeg_classification resnet50_pt sample_classification.jpg
    If you want to run the program in batch mode, which means that the DPU processes multiple images simultaneously, you have to compile the entire Vitis AI Library according to the instructions in the Setting Up the Host section. Then the batch mode program will be generated in the build_dir_default location. Enter build_dir_default, and execute the following command.
    ./test_classification_batch resnet50_pt <img1_url> [<img2_url> ...]
  4. To run the video example, run the following command:
    ./test_video_classification resnet50_pt <video_input.mp4> -t 8

    Here, video_input.mp4 is the video file that you have to prepare for input and -t is the number of threads.

  5. To test the performance of the model, run the following command:
    ./test_performance_classification resnet50_pt test_performance_classification.list -t 8 -s 60 

    Here, -t is the number of threads and -s is the number of seconds.

    To view a complete listing of command line options for the executable, run the command with the '-h' switch.

    • The performance test program is automatically run in batch mode.
    • If you run the examples in a hetergeneous V70 system, configure the SoftMax env using "export XLNX_ENABLE_C_SOFTMAX=1".