UCLA-VAST / tapa

TAPA is a dataflow HLS framework that features fast compilation, expressive programming model and generates high-frequency FPGA accelerators.
https://tapa.rtfd.io
MIT License
144 stars 27 forks source link

Compilation hangs when compiling .xo files. #148

Open logosAllen opened 4 months ago

logosAllen commented 4 months ago

Dear Authors,

With the 20240301 release, while I run

cd apps/vadd
source run_tapa.sh

TAPA will stock at

VirtualBox:~/tapa/apps/vadd$ source run_tapa.sh
I0305 16:38:06.053 tapa.util:184] logging level set to INFO
I0305 16:38:06.053 tapa.tapac:407] Executing all steps of tapac
W0305 16:38:06.053 tapa.tapac:429] The floorplan option is automatically enabled because a floorplan output file is provided
I0305 16:38:06.053 tapa.tapac:521] running translated command: `tapa --work-dir=run analyze --input=vadd.cpp --top=VecAdd synth --part-num=xcu250-figd2104-2L-e --clock-period=3.33 optimize-floorplan --connectivity=link_config.ini link --floorplan-output=run/VecAdd_floorplan.tcl pack --output=run/VecAdd.xo`
I0305 16:38:06.054 tapa.util:184] logging level set to INFO
I0305 16:38:06.054 tapa.tapa:54] tapa version: 0.0.20240301.1
I0305 16:38:06.054 tapa.tapa:58] Python recursion limit set to 3000
I0305 16:38:06.077 tapa.steps.analyze:151] added vendor include path `/opt/Xilinx/Vitis_HLS/2022.2/include`
I0305 16:38:06.077 tapa.steps.analyze:248] Running tapacc command: /usr/bin/tapacc run/flatten/flatten-4a47ad8f-vadd.cpp -top VecAdd -- -std=c++17 -I /home/user/.local/lib/python3.8/site-packages/tapa/../../../src -isystem /opt/Xilinx/Vitis_HLS/2022.2/include -stdlib=libc++ -isystem /usr/lib/llvm-17/include/c++/v1/ -isystem /usr/include/clang/17/include/ -isystem /usr/lib/clang/17/include/
I0305 16:38:06.668 tapa.steps.common:92] writing TAPA graph to json `run/graph.json`.
I0305 16:38:06.668 tapa.steps.common:92] writing TAPA settings to json `run/settings.json`.
I0305 16:38:06.669 tapa.steps.common:46] reusing TAPA settings from upstream flows.
I0305 16:38:06.669 tapa.core:184] extracting HLS C++ files
I0305 16:38:06.671 tapa.core:216] running HLS
I0305 16:38:06.673 tapa.core:262] spawn 8 workers for parallel HLS synthesis of the tasks

OS: Ubuntu 20.04.6 Vitis version: 2022.2

How to solve this problem?

Thanks

logosAllen commented 4 months ago

After upgrade to Vitis 2023.2, the same problem happened. But it show that

initialization failed: couldn't load file "libxv_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory

so after install libtinfo5, the .xo file can be compiled. This issue may happen only on virtual machine, since I install the minimal set of OS

sudo apt-get install libtinfo5

Thanks

Blaok commented 4 months ago

@logosAllen Does HLS hang if you run it by itself without TAPA? I suspect this is a general issue with Vitis HLS; you just need to install libtinfo :(

Here is a list of packages I install to Ubuntu (20.04 and 22.04) to run Xilinx tools:

https://github.com/UCLA-VAST/tapa/blob/84fc3d043bb0391b100d683947552a600daf5467/docker/Dockerfile#L16-L25