-
Notifications
You must be signed in to change notification settings - Fork 58
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
Issue Queue Implementation #140
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few starter comments. Looking great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes to be addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome, @aarongchan! Thank you for doing this. It looked like a LOT of work.
riscv-perf-model/arches/medium_core.yaml Lines 18 to 25 in fe146ae
Could we remove the execution_topology part? seems redundant as the pipe_topology_*_pipes implicitly defines the number of functional units? And as a further improvement, we just have a single nested list defining the issue queues and the functional units like: [ IQ0, [ALU0, [PIPE0, PIPE1], ALU1, [PIPE2]], IQ1 .. Example:
Though I'm not sure if the API supports nesting like that. |
@klingaard @kathlenemagnus thoughts on this/any preference? I'm open to trying something like this because it simplifies the walking of the .yaml to assign executepipes to issue queues, not sure of the C++ aspect of it given it would be a mix of string and vector in a vector. One thought I had would be to do it like this:
where we have a triple nested vector, where the first vector is each issue queue, 2nd vector is all the execution units in that issue queue, and the 3rd vector are strings, where the first string is the execution unit type, and the subsequent strings are the pipe targets. The only downside I see of nesting it like this is that it makes it a little unclear how many of each execution units there are due to the nesting, while what we have right now is pretty clear on all the definitions. Open to modifying accordingly to what people have a preference for. |
First, I agree with @danbone, the I like the suggest you put forth, but unfortunately I don't think the sparta Parameter class supports more than two levels of nesting without modification. Unfortunately this limitation forces a layout that requires at least 2 or more parameters. One that defines the number of pipelines, another that maps the pipelines to an issue queue, and another that maps dispatch queues to issue queues. Let me see if I can elaborate it with some general use cases using what is supported. Mapping of a 1 -> 1 -> 1
Mapping of 2 -> N -> M
Of course you can get fancy with the yaml here if you want or create your own "language" to get around the 3 deep nested parameter. Up to you. |
@klingaard I'm working through the changes we discussed yesterday around making each execution unit a generic name and not bounding an execution unit type to it. However, when it comes to branch unit, I run into the issue when testing branch misprediction. riscv-perf-model/test/sim/CMakeLists.txt Line 74 in ce29ae2
In general though are we ok with this change, it gives more burden on the user to make sure they define everything and map everything correctly. For example this assert now fails given we don't have a specific excution unit group anymore, which I can delete if we want to move forward with this change, but wanted to double check we're ok with this approach. Or do we want to make an exclusion for branches and have them specifically defined. riscv-perf-model/core/ExecutePipe.cpp Line 51 in ce29ae2
|
Regarding the random branch prediction parameter, there's no harm in doing this:
This, of course, does not address the assert that you see. For that, I suggest that the assertion be removed and instead of checking for the node name, look at the pipes assigned. If the queue has a BR pipe, THEN it should pay attention to this parameter. Otherwise, it's ignored by the pipe. |
One other piece of cleanup -- I think you can remove the |
…oughout olympia, counters now count for target pipes
…ence_counter_, updating with more relevant tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible seg fault lurking in the code.
Signed-off-by: Aaron Chan <[email protected]>
…me, but branch tests use exe* so we get error
@aarongchan you ready for me to merge this? |
Yep I am, was waiting to see if any other comments. I have the email drafted to send to sig as well once we merge. |
Alright! Let's do it. If someone has questions/issues with this, then another PR can be posted. |
This PR adds issue queue modeling to Olympia, by allowing users to define the number of issue queues, which execution units map to which issue queues, and which target pipes are supported for each execution unit.
Regressions will fail until we merge scoreboard fix in Sparta.
Old flow:
dispatch -> executepipe->execute
New flow:
dispatch -> issue queue -> executepipe -> execute