Xilinx/mlir-aie

Issues with running executables on VCK 190: host.exe fails

tanvirarafin opened this issue · 1 comments

Hi,

I have successfully built the vck190_bare_prod and tried to run executables. However, something is broken.

First, the host.exe file present in the freshly built SD card image for the Vitis design that compiles a 32 GMIO AIE design with simple add functionality to enable all NoC NMU/NSU connections so all shimDMAs (used for GMIO) are enabled, does not work. Running on the board gives the following output:

root@petalinux:/mnt/sd-mmcblk0p1# ./host.exe
Initializing ADF API...
[   60.197553] zocl-drm amba_pl@0:zyxclmm_drm: zocl_create_client: created KDS c                                                                                                                                                      lient for pid(668), ret: 0
[   60.206965] zocl-drm amba_pl@0:zyxclmm_drm: zocl_destroy_client: client exits                                                                                                                                                       pid(668)
[   60.222549] zocl-drm amba_pl@0:zyxclmm_drm: zocl_create_client: created KDS c                                                                                                                                                      lient for pid(668), ret: 0
XRT build version: 2.12.0
Build hash: 2719b6027e185000fc49783171631db03fc0ef79
Build date: 2021-10-09 04:14:02
Git branch: 2021.2
PID: 668
UID: 0
[Mon May 28 23:16:41 2018 GMT]
HOST: petalinux
EXE: /media/sd-mmcblk0p1/host.exe
[XRT] ERROR: basic_string::_M_construct null not valid
[XRT] ERROR: No AIE presented: Invalid argument
[XRT] ERROR: failed to open graph: Invalid argument
ERROR: GraphXRTImpl::configureIfNotYet: xrtGraphOpen failed.
GraphXRTImpl::configureIfNotYet: Couldn't find any configuration for graph id 0
ERROR: adf::graph::init: Failed to configure graph.
[XRT] ERROR: No AIE presented: Invalid argument
[XRT] ERROR: failed to open graph: Invalid argument
ERROR: GraphXRTImpl::configureIfNotYet: xrtGraphOpen failed.
GraphXRTImpl::configureIfNotYet: Couldn't find any configuration for graph id 0
ERROR: adf::graph::update: Failed to configure graph.
[XRT] ERROR: No AIE presented: Invalid argument
[XRT] ERROR: failed to open graph: Invalid argument
ERROR: GraphXRTImpl::configureIfNotYet: xrtGraphOpen failed.
GraphXRTImpl::configureIfNotYet: Couldn't find any configuration for graph id 0
ERROR: adf::graph::update: Failed to configure graph.
[XRT] ERROR: No AIE presented: Invalid argument
[XRT] ERROR: failed to open graph: Invalid argument
ERROR: GraphXRTImpl::configureIfNotYet: xrtGraphOpen failed.
GraphXRTImpl::configureIfNotYet: Couldn't find any configuration for graph id 0
ERROR: adf::graph::update: Failed to configure graph.
[XRT] ERROR: No AIE presented: Invalid argument
[XRT] ERROR: failed to open graph: Invalid argument
ERROR: GraphXRTImpl::configureIfNotYet: xrtGraphOpen failed.
GraphXRTImpl::configureIfNotYet: Couldn't find any configuration for graph id 0
ERROR: adf::graph::update: Failed to configure graph.
[XRT] ERROR: No AIE presented: Invalid argument

.... after a lot of similar lines the errors end with

[XRT] ERROR: No AIE presented: Invalid argument
[XRT] ERROR: failed to open graph: Invalid argument
ERROR: GraphXRTImpl::configureIfNotYet: xrtGraphOpen failed.
GraphXRTImpl::configureIfNotYet: Couldn't find any configuration for graph id 0
ERROR: adf::graph::end: Failed to configure graph.
Test failed with 8192 errors
GMIO::free completed

I have followed directions from here to build the SD card image.

Second, I compiled the tutorial-2c executable following the directions here. However, executing that on the board does not generate any output, nor does it give any error messages.

root@petalinux:/home# export XILINX_XRT=/usr
root@petalinux:/home# ./tutorial-2c.exe
root@petalinux:/home#

For Tutorial 9 with external kernels, I am seeing the following error:

root@petalinux:~# ./tutorial-9_perf.exe
./tutorial-9_perf.exe: error while loading shared libraries: libxaiengine.so: cannot open shared object file: No such file or directory

Here are some updates on this. Upon further digging, we found that the correct way to run host.exe is

root@petalinux:/mnt/sd-mmcblk0p1# ./host.exe a.xclbin

Also, we tried to copy the libxaiengine.so into the /lib directory in the SD card and build the tutorials with the sysroot(an example is shown below).

aiecc.py -j4 --sysroot=/home/marafin/mlir-aie_2/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/ --host-target=aarch64-xilinx-linux aie.mlir -I/home/marafin/mlir-aie_2/install/runtime_lib/aarch64/test_lib/include -I/home/marafin/mlir-aie_2/install/runtime_lib/aarch64/xaiengine/include --gcc-toolchain=/home/marafin/mlir-aie_2/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/ -L/home/marafin/mlir-aie_2/install/runtime_lib/aarch64/test_lib/lib -ltest_lib -I/home/marafin/mlir-aie_2/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/include/c++/10.2.0 -I/home/marafin/mlir-aie_2/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/include/c++/10.2.0/aarch64-xilinx-linux -I/home/marafin/mlir-aie_2/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/include -L/home/marafin/mlir-aie_2/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/lib/aarch64-xilinx-linux/10.2.0 -B/home/marafin/mlir-aie_2/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/lib/aarch64-xilinx-linux/10.2.0 ./test.cpp -o test.exe

The build process is successful; however, running the code on the board throws a segfault. I've included an example below.

root@petalinux:/mnt/sd-mmcblk0p1# ./tutorial-2c/test.exe
Tutorial-2c test start.
Segmentation fault