Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xgboost example VivadoHLS segfault #11

Open
KOVI89alipes opened this issue Jan 5, 2021 · 5 comments
Open

xgboost example VivadoHLS segfault #11

KOVI89alipes opened this issue Jan 5, 2021 · 5 comments

Comments

@KOVI89alipes
Copy link

Hi,

I tried to run xgboost_to_hls.py example, but Vivado HLS fails with segmentation fault
It's probably something with the array ranges?

INFO: [XFORM 203-11] Balancing expressions in function 'hls4ml_burr' (firmware/hls4ml_burr.cpp:4)...4 expression(s) balanced.
Stack dump:
0.	Running pass 'Function Pass Manager' on module '~/ip_cores/hls4ml_burr/build/hls4ml_burr_prj/solution1/.autopilot/db/a.o.1.tmp.bc'.
1.	Running pass 'Instruction simplification' on function '@"BDT::Tree<3, ap_fixed<18, 8, (ap_q_mode)5, (ap_o_mode)3, 0> [10], ap_fixed<18, 8, (ap_q_mode)5, (ap_o_mode)3, 0>, ap_fixed<18, 8, (ap_q_mode)5, (ap_o_mode)3, 0> >::decision_function"'
Abnormal program termination (11)
Please check '~/hls4ml_burr/build/hs_err_pid27358.log' for details
segfault in /tools/Xilinx/Vivado/2020.1/bin/unwrapped/lnx64.o/vivado_hls -exec vivado_hls -f build_prj.tcl reset=1 csim=0 synth=1 cosim=0 validation=0 export=1 vsynth=0, exiting...
Makefile:12: recipe for target 'build_hls' failed
make: *** [build_hls] Error 139

See the project archive for more details
https://justbeamit.com/q9zra

@KOVI89alipes
Copy link
Author

The same segfault errors with sklearn_RandomForest.py and sklearn_to_hls.py examples

@thesps
Copy link
Owner

thesps commented Feb 3, 2021

Hi, this issue is Vivado version related. I think it works on 2018 versions, but this error appears for 2019 and 2020 versions. I haven't figured out what actually causes the issue yet.

Some workarounds for the time being : use a 2018 version of Vivado; or use the VHDL backend.

@KOVI89alipes
Copy link
Author

The BDT project generated by 5dcd46823dfe4ee08507513a3a5aa3ab397b7900 compiles in Vitis 2020.2

/tools/Xilinx/Vitis_HLS/2020.2/bin/vitis_hls -f build_prj.tcl "reset=1 csim=0 synth=1 cosim=0 validation=0 export=1 vsynth=0"

@thesps Do you think it makes sense to add something like

set vivadoVer [lindex [split [version] "\n"] 0]
if {$vivadoVer=="Vivado v2020.1 (64-bit)"} {
	error "$vivadoVer is not supported, please update to Vivado 2020.2" 
}

To

@thesps
Copy link
Owner

thesps commented Mar 22, 2021

Would you be able to test this branch? It contains PR #12 , which should resolve that Abnormal program termination error for older Vivado versions as well as support Vitis.

@KOVI89alipes
Copy link
Author

KOVI89alipes commented Mar 23, 2021

@thesps yes, sklearn_to_hls.py example compiles with Vivado 2020.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants