-
Notifications
You must be signed in to change notification settings - Fork 93
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
HCL Smith-Waterman Example: HLS code failed synthesis #437
Comments
We shouldn't unroll the loop. We should just pipeline it. Do we specify that in the HCL code? |
We should just move the initialization outside. |
It's ok to modify the HCL code as long as it makes sense and is still functional. |
In HCL code, the outer loop is pipelined, and inner loop is optimized with So these loops should be moved outside of the top-level loop nests, right? ap_int<16> matrix[129][129];
for (ap_int<32> x = 0; x < 129; ++x) {
for (ap_int<32> y = 0; y < 129; ++y) {
matrix[x][y] = (ap_int<16>)0;
}
}
ap_int<16> action[129][129];
for (ap_int<32> x1 = 0; x1 < 129; ++x1) {
for (ap_int<32> y1 = 0; y1 < 129; ++y1) {
action[x1][y1] = (ap_int<16>)3;
}
} I will modify the HLS code first and will update the HCL code once I ensure the HSL can actually work. |
The log from Vitis HLS 2020 is a bit misleading and it points to a random line number and complains that "the loop" in that line cannot be unrolled... After I switched to Vitis 2019, I figured out that Vitis HLS actually has difficulty unrolling one of the loop nest inside body of the for (ap_int<32> t_outer = 0; t_outer < 32; ++t_outer) {
for (ap_int<32> t_inner = 0; t_inner < 32; ++t_inner) {
#pragma HLS pipeline
ap_int<32> mutate3;
for (ap_int<32> i = 0; i < 129; ++i) { // THIS CANNOT BE UNROLLED
for (ap_int<32> j = 0; j < 129; ++j) {
ap_int<32> trace_back[4];
for (ap_int<32> x2 = 0; x2 < 4; ++x2) {
trace_back[x2] = 0;
} |
Do you have the complete HLS generated code? |
Im trying to reproduce some performance numbers mentioned in HCL paper on AWS F1.
Here is part of generated HLS code from HCL. The root cause, as indicated in the error log, is that the second loop's body is too large to be unrolled. We probably need function outlining for the large loop body here to make it synthesizable
The text was updated successfully, but these errors were encountered: