Replies: 5 comments 2 replies
-
I get the problem you're trying to solve, but I am quite strongly against another type of configuration file or another domain-specific language. Why not extend the |
Beta Was this translation helpful? Give feedback.
-
@powerjg : I'm not sure I understand your vision here and how extending PowerModel instead would not devolve into requiring a similar configuration file? |
Beta Was this translation helpful? Give feedback.
-
I've converted this to a discussion instead of an issue since it's still quite nebulous. |
Beta Was this translation helpful? Give feedback.
-
Requirements/Desires:
Can we make a Python version of the strings? This would be more flexible as we can express things like "if (stat > 50) { use dynPower A } else { use dynPowerB }". For now let this be until we can find a case that breaks these strings or make them so ungainly. Alternatively eventually need stdlib to have the dynamic energies / static energies be part of its configuration (e.g., same place that latency, associativity, bandwidth, etc. is declared), and then this gets passed to the object class that goes with it. For example, the L2Cache could have its power values passed to the L2 object. I think the consensus is that @poal023 will try the latter. The outer loop in the above proposed code highlights a separate issue though -- we may need to have some sort of hierarchical stats that sum the power of the sub-components hierarchically. Table this for now until the above is fixed. |
Beta Was this translation helpful? Give feedback.
-
We had a meeting on December 6th about power modeling. I'm transcribing the notes taken during this meeting by @mattsinc with additional input by Alex Smith into this discussion, just so all our thoughts are in one place. @mattsinc 's notes on next "TODOs":
@powerjg 's respond which covers the "late binding issue":
|
Beta Was this translation helpful? Give feedback.
-
This is not a bug directly, but since the Discussions option seems to be used for other purposes, I'm posting it here.
Ultimately, one of the goals my group is working on is updating the power model to design an interface that is easy (easier?) for users to plug in power models for CPUs, GPUs, caches/main memory, or other accelerators. @poal023 and I have been looking into this, and have a proposal we'd like to run by the community.
Currently, the power model (e.g., https://gem5.googlesource.com/public/gem5/+/refs/heads/develop/configs/example/arm/fs_power.py#54) allows a user to essentially multiply/sum anything a given component accesses as long as there is a stat that goes with it, and as long as the user provides some sort of dynamic power (likewise, static power) to multiply/sum these parts together. This works ok if the number of components being expressed in a string (e.g., lines 54-55 in the above) are small, but if the number of components are large (e.g., all the different FUs/ROBs/branch predictors/etc. in a CPU), this seems unwieldy as the string on lines 54-55 would need to go on for many lines to incorporate all of these pieces.
What we propose to do is create a configuration file that a component like the above fs_power.py link could use. Each line in such a configuration file would be a triplet of <componentName, componentDynamicPowerPerAcc, correspondStat>. Then, we'd change the string multiplying/summing these components together would into a loop sort of like this:
This seems like it retains the flexibility of the current system, while also expanding it to make it more orderly and clear for any given component about how to express the information in a logic, systematic manner. Likewise, for anyone who adds a future component (e.g., accelerator, new memory, etc.) they could express a power model by passing in a dynamic power value for any component within it -- as long as there is a gem5 stat that goes with it.
Note that this proposal does not tie us to Cacti, McPat, or any other specific tool. It just specifies a way for users to specify how their power model should behave in terms of its parts.
Thoughts?
CC: @BobbyRBruce , @powerjg
Beta Was this translation helpful? Give feedback.
All reactions