Conversation
Add API grouping vars as EntryVar/ExitVar/BackEdgeVar. Provide functions similar to theta, gamma etc to deal with these variables. Use this API in DNE, and simplify how they operate. This does not yet consistently use the new API or eliminate the subclasses of RegionArgument/RegionResult, but is a necessary step.
13cae04 to
b1e2680
Compare
| } | ||
| else | ||
| { | ||
| abort(); |
| } | ||
| else | ||
| { | ||
| abort(); |
|
@sjalander I need help with this one, apparently this changes cycle times. The change should be almost no-op, except that I guess it may changed ordering of inputs/outputs/arguments. However I might be overlooking something fundamental. |
|
@caleridas In order to make the HLS test suite pass, you might need to adjust the golden cycles. You can do this by finding the respective file under you would need to adjust the file |
|
@caleridas @phate For updating the golden cycles, there is an argument to the run script to do this automatically. I will try to find out more about why this happens. |
|
I've not had time to verify this, but as Nico and I are away for the weekend, I thought I provide what has been found as the likely reason for the changed behavior. Why the LoopNode Branch Does NOT Remove Nodes That Master RemovesThe question: given that graph-28 is structurally identical between branches, why does the loopnode branch produce a larger graph after The sole cause:
|
By this description I don't fully understand if/how the original transformation could be sound. AFAICT, there are the following possible cases for a region argument to connect directly to a region result:
I am really not clear what the original code does in terms of soundness. As I see it:
so what ought to work for passthrough is:
This is what the refactored code is intending to do, what exactly am I missing? Is there no unit test validating that all inputs / outputs / passthroughs are removed as intended? |
|
The HLS backend is unfortunately not unit tested, it is something being worked on. Analysis of
|
what does "obtaining the value of every loop iteration" mean? I thought there is exactly one value per output, at end of loop -- and not one value generated per each loop iteration (I have difficulty making sense what this ought to mean in RVSDG even). Also with the proposed patch I do not understand this bit: the second divert_users to backedge->pre IMHO does not make sense -- backedge->pre is inside the region, but this diverts an output of the loop node to an edge inside the region? how can that work? lastly, the remove_if condition in the patch appears inverted: Since we are building the list of vars to be removed, we want to remove from the list the variables that should survive -- but this makes exactly all unused variables survive? How can this work? |
|
One of the cases with a significant change in cycles is The code of the HLS kernel: The |
Add API grouping vars as EntryVar/ExitVar/BackEdgeVar. Provide functions similar to theta, gamma etc to deal with these variables.
Use this API in DNE, and simplify how they operate.
This does not yet consistently use the new API or
eliminate the subclasses of RegionArgument/RegionResult, but is a necessary step.