-
Notifications
You must be signed in to change notification settings - Fork 132
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
[HW] Generic optimizations on hazard handling + Barber's Pole + OpQueue Fix #190
Conversation
7ca9031
to
cf45273
Compare
Before this commit, all the hazards (RAW, WAR, WAW) are handled by the operand requesters that throttle access to source reg elements. Even if the hazard is a WAR/WAW, the suboptimal but efficient way to deal with it is to slow down the source reg fetch. If an instruction does not have source regs, this cannot happen. For example, load instructions. Therefore, all the instructions that do not have vector source operands are stalled in the sequencer. Loads are super common, and stalling in the main sequencer means that all the instructions after the load are also stalled and cannot start their execution. Therefore, now they are processed, and the hazard check is done inside the VLDU. The write-back request is masked until there is no more any hazards on that load instruction.
With Barber Pole layout, the PEs can almost always increment the address by 1 when writing back new data into the VRF. Only the Slide Unit has some special treatment, as its start address come with an offset. Remember that the VRF layou should also be consistent among different LMUL settings, i.e. when LMUL > 1 and we pass from reg N to reg N+1, we must also take into account that reg N+1 has a different starting position for element 0.
Slide1Up/Down were blocked in the main sequencer when they had specific hazards. Now, these hazards are handled downstream, waiting for 1 cycle of stall and then continuing with the usual protocol. WAW hazards for widening instructions are also handled better now, discriminating between real widening instructions and reductions.
Greetings, |
Hello @hoggur2000, Barber's Pole is currently not implemented in Ara, and a draft version of it can be found in this PR. The logic to calculate the addresses with Barber's Pole is here: But the implementation is not 100% bug-free. Have a look at the file and, if you have questions, I will be happy to answer! :-) Best, |
Hi Matteo, |
This PR was broken down into two different PRs: #202 #203
The only original contribution here is Barber Pole. Need to clean this before merging.
Heterogeneous PR with optimizations and fixes.
Changelog
Fixed
cmdBuffer
anddataBuffer
depth parameters in the operand queuesAdded
Changed
vload
hazards in theVLDU
without stalling the main sequencerslide1x
instructions are now not stalled in the main sequencer, but the hazard is handled downstreamChecklist