Xilinx / mlir-aie

An MLIR-based toolchain for AMD AI Engine-enabled devices.
Other
314 stars 91 forks source link

In vck190, "make aie_platform_build" error? #165

Closed HadXu closed 2 years ago

HadXu commented 2 years ago

Environment:

v++: Vitis/2021.2/bin/v++ petalinux: 2021.2

And make xsa petalinux_build petalinux_sysroot is successful. make aie_platform_build error. Some info below.

...
Attempting to get a license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 17-349] Got license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 21-403] Loading part xcvc1902-vsva2197-2MP-e-S
INFO: [VPL 19-234] Refreshing IP repositories
INFO: [VPL 19-1700] Loaded user IP repository '/data/Xilinx/Vitis/2021.2/data/cache/xilinx'.
INFO: [VPL 19-1700] Loaded user IP repository '/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform/_x/link/vivado/vpl/.local/hw_platform/ipcache'.
INFO: [VPL 19-1700] Loaded user IP repository '/data/Xilinx/Vitis/2021.2/data/ip'.
INFO: [VPL 19-2313] Loaded Vivado IP repository '/data/Xilinx/Vivado/2021.2/data/ip'.
Command: synth_design -top ext_platform_emb_mem_gen_0_0 -part xcvc1902-vsva2197-2MP-e-S -mode out_of_context
Starting synth_design
Attempting to get a license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 17-349] Got license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 21-403] Loading part xcvc1902-vsva2197-2MP-e-S
[08:53:39] Block-level synthesis in progress, 0 of 7 jobs complete, 7 jobs running.
INFO: [VPL 8-7079] Multithreading enabled for synth_design using a maximum of 1 processes.
INFO: [VPL 8-7078] Launching helper process for spawning children vivado processes
INFO: [VPL 8-7075] Helper process launched with PID 8179
Command: synth_design -top ext_platform_icn_ctrl_0 -part xcvc1902-vsva2197-2MP-e-S -mode out_of_context
Starting synth_design
Attempting to get a license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 17-349] Got license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 21-403] Loading part xcvc1902-vsva2197-2MP-e-S
INFO: [VPL 8-7079] Multithreading enabled for synth_design using a maximum of 1 processes.
INFO: [VPL 8-7078] Launching helper process for spawning children vivado processes
INFO: [VPL 8-7075] Helper process launched with PID 8183
INFO: [VPL 8-7079] Multithreading enabled for synth_design using a maximum of 1 processes.
INFO: [VPL 8-7078] Launching helper process for spawning children vivado processes
INFO: [VPL 8-7075] Helper process launched with PID 8184
Command: synth_design -top ext_platform_cips_noc_0 -part xcvc1902-vsva2197-2MP-e-S -mode out_of_context
Starting synth_design
Attempting to get a license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 17-349] Got license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 21-403] Loading part xcvc1902-vsva2197-2MP-e-S
INFO: [VPL 8-7079] Multithreading enabled for synth_design using a maximum of 1 processes.
INFO: [VPL 8-7078] Launching helper process for spawning children vivado processes
INFO: [VPL 8-7075] Helper process launched with PID 8178
Command: synth_design -top ext_platform_noc_ddr4_0 -part xcvc1902-vsva2197-2MP-e-S -mode out_of_context
Starting synth_design
Attempting to get a license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 17-349] Got license for feature 'Synthesis' and/or device 'xcvc1902'
INFO: [VPL 21-403] Loading part xcvc1902-vsva2197-2MP-e-S
INFO: [VPL 8-7079] Multithreading enabled for synth_design using a maximum of 1 processes.
INFO: [VPL 8-7078] Launching helper process for spawning children vivado processes
INFO: [VPL 8-7075] Helper process launched with PID 8182
INFO: [VPL 8-7079] Multithreading enabled for synth_design using a maximum of 1 processes.
INFO: [VPL 8-7078] Launching helper process for spawning children vivado processes
INFO: [VPL 8-7075] Helper process launched with PID 8181
INFO: [VPL 8-7079] Multithreading enabled for synth_design using a maximum of 1 processes.
INFO: [VPL 8-7078] Launching helper process for spawning children vivado processes
INFO: [VPL 8-7075] Helper process launched with PID 8180
[08:54:05] Block-level synthesis in progress, 0 of 7 jobs complete, 7 jobs running.
[08:54:05] Run vpl: FINISHED. Run Status: synth ERROR
WARNING: [VPL 60-732] Link warning: No monitor points found for BD automation.
ERROR: [VPL 60-1328] Vpl run 'vpl' failed
WARNING: [VPL 60-1142] Unable to read data from '/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform/_x/link/vivado/vpl/output/generated_reports.log', generated reports will not be copied.
ERROR: [VPL 60-806] Failed to finish platform linker
INFO: [v++ 60-1442] [08:54:14] Run run_link: Step vpl: Failed
Time (s): cpu = 00:04:40 ; elapsed = 00:06:29 . Memory (MB): peak = 2071.855 ; gain = 0.000 ; free physical = 6885 ; free virtual = 8300
ERROR: [v++ 60-661] v++ link run 'run_link' failed
ERROR: [v++ 60-626] Kernel link failed to complete
ERROR: [v++ 60-703] Failed to finish linking
INFO: [v++ 60-1653] Closing dispatch client.
Makefile:164: recipe for target 'vck190_aie_base_graph_hw.xclbin' failed
make[1]: *** [vck190_aie_base_graph_hw.xclbin] Error 1
make[1]: Leaving directory '/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform'
Makefile:39: recipe for target 'aie_platform_build' failed
make: *** [aie_platform_build] Error 2
HadXu commented 2 years ago

Update:

when I build with clang

clang: clang version 16.0.0 lld: LLD 16.0.0 (compatible with GNU linkers)

clang --target=aarch64-linux-gnu -std=c++11 --sysroot=/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux -DLIBXAIENGINEV2 -I/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/include/c++/10.2.0 -I/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/include/c++/10.2.0/aarch64-xilinx-linux -I/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/include/c++/10.2.0/backward -L/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/lib/aarch64-xilinx-linux/10.2.0 -I/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/include -L/home/lay/work/vck190/mlir-aie/platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/lib -Iacdc_project -fuse-ld=lld -lm -rdynamic -lxaiengine -ldl -I/home/lay/work/vck190/mlir-aie/runtime_lib /home/lay/work/vck190/mlir-aie/runtime_lib/test_library.cpp test.cpp -o test.elf
ld.lld: error: cannot open crtbeginS.o: No such file or directory
ld.lld: error: cannot open crtendS.o: No such file or directory
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
HadXu commented 2 years ago

clang should with -B tag. like -B platforms/vck190_bare_prod/aie_platform/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux/usr/lib/aarch64-xilinx-linux/10.2.0/.