Skip to content

Latest commit

 

History

History
144 lines (100 loc) · 3.8 KB

4-VCK5000.md

File metadata and controls

144 lines (100 loc) · 3.8 KB

Demo 4: VCK5000 Exploration

This demo shows how to use the VCK5000 in HACC@NUS. We highly recommend you to use tmux for multiple tasking, which lets you switch easily between several programs in one terminal.

Compiling VCK5000 Project

HACC@NUS provides following software environment for the compilation and execution of VCK5000 program.

XRT: 2.14.384

Vitis: 2022.2

  1. Login to a node with VCK5000 software environment

Due the compatibility issues with other Alveo boards, we provide a separate compilation node for VCK5000. To use this node, simply run the following command:

./env/vck5000_compile
  1. Setup XRT and Vitis environment.
source ./env/vck5000_env

The terminal will print the toolchain version information like this:

{
  "BUILD_VERSION" : "2.14.384",
  "BUILD_VERSION_DATE" : "Fri, 09 Dec 2022 00:55:08 -0800",
  "BUILD_BRANCH" : "2022.2",
  "VERSION_HASH" : "090bb050d570d2b668477c3bd0f979dc3a34b9db",
  "VERSION_HASH_DATE" : "Thu, 8 Dec 2022 16:23:56 +0530"
}

/tools/Xilinx/Vitis/2022.2/bin/vitis

Then you can compile your project (e.g., the mixed kernel demo from the early access page).

  1. Exit from the compilation node

If you want to run the application on VCK5000, it is necessary to take a step back to HACCHEAD and prepare to login in a vck5000 compute node.

exit

Run VCK5000 Program

To execute your VCK5000 program, you should allocate an idle VCK5000 compute node according sinfo

  1. Check the status of VCK5000 compute node

For example, an output of sinfo like this:

PARTITION                         AVAIL  TIMELIMIT  NODES  STATE NODELIST
cpu_only*                            up 7-00:00:00      1   idle hacc-node2
head                                 up 2-00:00:00      1   unk* hacchead
u50_standard_reservation_pool        up   12:00:00      1   idle hacc-u50-1
vck5000_standard_reservation_pool    up      20:00      1  alloc hacc-vck5000-1
vck5000_standard_reservation_pool    up      20:00      3   idle hacc-vck5000-[2-4]
vck5000_compile                      up 7-00:00:00      1    mix hacc-node0
u250_standard_reservation_pool       up   12:00:00      4   idle hacc-u250-[1-4]

It indicates that the board 1 is allocated by other users, and your available VCK5000 boards are board 2, 3 and 4.

  1. Allocate the idle VCK5000 board

Suppose you want to allocate board 2, simply run:

./env/vck5000_alloc 2

or

srun -p vck5000_standard_reservation_pool  --pty bash -i 
  1. Setup the software environment

Setup env:

source ./env/vck5000_env
  1. Run the application

Run the example: (You need to ask AMD/Xilinx for the source code)

cd vck5000_example
./host_overlay.exe -i sand.jpg

The output should be like this:

Input JPEG file size = 1983165
Program running in hardware mode
Load overlay_hw.xclbin
Create kernels
Create input and output device buffers for JPEG decoder
Create runner
Read JPEG file and transfer JPEG data to device... Done
Run krnl_jpeg... Finish
Transfer YUV data to host... Done
Transfer Info data to host... Done
Successfully decode the JPEG file.
The JPEG file is decoded to image 'decoded.bmp' of 3648 by 2736
Transfer AIE ctrl packet to device... Done
Run krnl_yuv_mover and krnl_rgb_mover... 
krnl_yuv_mover finish
krnl_rgb_mover finish
Transfer mixed RGB data to host... Done
The mixed image is written to 'mixed.bmp'.

In the case of:

  • Your PL kernels are stalled by an unknown reason.

Please make sure your kernel has passed the emulation test. Please run the following command in the allocated VCK5000 node.

./env/vck5000_exit

It may pop some error messages, feel free to ignore them. The node will be set to down for several minutes (around two minutes), after that, it will be available for new allocation.

  1. Exit from the Compute node
exit