Xilinx / HLS

Vitis HLS LLVM source code and examples
Other
379 stars 57 forks source link

error: unsupported pointer reinterpretation #8

Closed SerenaC94 closed 2 years ago

SerenaC94 commented 2 years ago

trmm.ll.zip

When I try to synthesize the attached LLVM IR, Vitis fails with the following error:

ERROR: [SYNCHK 200-43] in function 'trmm_2_kernel': use or assignment of a non-static pointer 'indvars' (this pointer may refer to different memory locations).
ERROR: [SYNCHK 200-41] in function 'trmm_2_kernel': unsupported pointer reinterpretation from type 'i32*' to type '[4 x i32]*' on variable 'indvars'.
INFO: [SYNCHK 200-10] 2 error(s), 0 warning(s).
Command         transform done; error code: 1; 
ERROR: [HLS 200-70] Synthesizability check failed.

There is no 'indvars' in the input IR, so I don't know how to proceed to solve this problem. My setup is the same as in #7 (Vitis HLS 2021.1 and custom compilation flow).

keryell commented 2 years ago

There is a new 2022.1 out now. It might help. It could also be worse. Difficult to say... :-/

SerenaC94 commented 2 years ago

I just tried with 2022.1, the error is the same.

SerenaC94 commented 2 years ago

My best guess is that the trmm kernel has an irregular loop structure, so Vitis has a hard time reconstructing the loop from the IR. But I would like to be sure that the IR does not contain anything unsupported.

Fangqing2018 commented 2 years ago

The IR here is good, but there's improper transformation in Vitis HLS, currently we don't know how to workaround it in llvm-ir level. You might need to wait for next release.