Fix Vitis Conv1D/2D latency strategy
Created by: vloncar
Description
This fixes #805 (closed). Vitis HLS compiler has problems with synthesizing pointer expressions like *(res++)
. Using array indexing resolves the compilation issue, but then the design fails to meet timing, due to the inlining of the conv_1d_latency_cl
(ditto 2d) function. This seems to be on a per-layer (or model) basis, since it works sometimes. It's best to disable it to meet timing in the general case, but then people can explore enabling it to save a few cycles. I left a comment along those lines. I implemented it only for Vitis, but if people encounter the issue in Vivado we can use the same fix there, again bringing the backends to single-source HLS implementation.
Also, I used the opportunity to sneak a commit that fixes the Vitis pragma warnings regarding DATA_PACK
pragma. This seems to be a leftover from a bad merge. The workaround used brings it in line with the rest of the codebase where we know it works.
Type of change
-
Bug fix (non-breaking change that fixes an issue)
Tests
Only synthesis will confirm this is the fix, and we don't (yet) have synthesis tests for Vitis, so this one is trust me bro type of PR. But @Duchstf will properly test it and report back, right Duc?
Checklist
I did all the things in the checklist.