Closed yn224 closed 2 years ago
@seanlatias @Hecmay Can I ask for a review for this branch? I'll open new PR for separate improvements in the API.
Can we try to add unit tests for all these features? Now we only have tests on complete examples. It's hard to know which test contains which features.
Can we try to add unit tests for all these features? Now we only have tests on complete examples. It's hard to know which test contains which features.
The only functionality added in this PR is querying by the stage directly instead of explicit notation of loop name, which may require actually running the HLS. Would you want the test to be able to run by having vhls
set to true?
No. I mean we should add unit test (i.e., a test whose sole purpose is to test certain features) instead of using a complete application. I thought you also fix a bug in this PR? For the unit test, it should be a minimal program that can reproduce your bug. And we should see that the bug is fixed after your PR.
This PR attempts to fix a minor issue that the report displayer has, where it incorrectly places latency information when loop optimization primitives have been applied to different loops. Also, it enhances the display query capabilities for loop names using actual stages.
Bug fix
For instance, when the user applies pipeline to the first nested loop of
E
, the output looks like such:whereas the correct output should be this
since the pipeline primitive has been applied to loop
E
instead ofD_y2
.This example output is from an unoptimized version (commenting out all the optimization techniques) of the Sobel example mentioned in PR #384 except loop
E
pipelined onaxis[1]
.Query Functionality
Also, we can now use actual stages to query the loops instead of querying them by loop names. For instance, we can not only query the
B
loop by usingreport.display(loop=['B'])
but also can usereport.display(loop=[s[kernel.B]])
.