-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
stdlib: Improve gem5 PyStats #996
base: develop
Are you sure you want to change the base?
stdlib: Improve gem5 PyStats #996
Conversation
a9665f0
to
d842e35
Compare
fd4a537
to
261c501
Compare
ee2d4f0
to
7fa7584
Compare
e893be9
to
a1c6b37
Compare
7dd21a7
to
515dac4
Compare
515dac4
to
350ef31
Compare
This isn't a true Base class, it's just a Vector. In gem5 all Vectors are Scalar Vectors. This change simplfies the naming. Change-Id: Ib8881d854ab18de6acbf0fb200db2de6a43621a7
The big thing missing from the Vector stats was that each position in the vector could have it's own unique id (a str, float, or int) and each position in the vector can have its own description. Therefore, to add this the Vector is represented as a dictionary mapping the unique ID to a Pystat Scaler (whcih can have it's own unique description. Change-Id: I3a8634f43298f6491300cf5a4f9d25dee8101808
As Distribution inherits from Vector, it should be constructed with a Dictionary of scalars (in our implementation, a dictionary mapping the vector position's unique id for each bin and the value of that bin). Change-Id: Ie603c248e5db4b6dd7f71cc453eebd78793f69a3
This appears to have no equivalent type in the CPP stats and was never utilized in PyStats. Change-Id: Ia9afc83b4159eb1ab2c6f44ec0ad86cd73f2a4f8
Change-Id: Icb2f691abf88ef4bac8d277e421329edb000209b
This was not used and easily confused with the other 'Vector' in PyStats. Change-Id: I9294bb0ae04db0537c87a5f50ce023fc83d587b8
This is inclusive of tests to ensure they have implemented correctly. Change-Id: I5c84d5ffdb7b914936cfd86ca012a7b141eeaf42
Change-Id: Iba0c93ffa5c4b18acf75af82965c63a8881df189
1. Thests here for the Scalar tasks are named appropriately. Not just generic "SimStats tess". 2. We remove 'simstat' terminology. The correct word is "Pystats". Change-Id: Idebc4e750f4be7f140ad6bff9c6772f580a24861
Change-Id: I1d93453072d12aa2dd40066f364723de1225b4e0
Change-Id: Iae12a0ac88f9646acb00e73d70f83b1e2ff94ac9
350ef31
to
0f6bd24
Compare
I believe I've fixed the failing tests. This should be ready for review. |
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.
Two small things, but overall it looks great! Thanks for the hard work!!
This commit addresses Jason's comment (gem5#996 (comment)) which highlighted putting the `_m5.stats.processDumpQueue` call in the iteration through the `root` object in `get_simstat` caused this function be potentially called many times when it only needs to be called once. This chance moved this call to just before this iteration and will tehrefore only be called once (if required) per `get_simstat` execution. Change-Id: I16908b6dee063a0df7877a19e215883963bfb081
Change-Id: Ifd3d88deebd4e72bdb8792405966d2e158e6366d
1. Adds newly added PyStat classes to "__init__.py", ensuring they can all be accessed via a `m5.ext.pystats` import. 2. Simplifies the layout out "__init__.py" to just import all classes from all files. Change-Id: I43bfc5e7ff1aec837e661905304c6fb10b00c90e
The SimStat Object is nothing more than a group of other SimStats and is therefore logically a group. With this, functionality can be shared more easily. Change-Id: I5dce23a02d5871e640b422654ca063e590b1429a
2f6a0df
to
92900ab
Compare
Bigs fixed of note: 1. The 'find' method has been fixed to work. This involved making 'children' a class implemented per-subclass as required. 2. The 'get_all_stats_of_name' method has been removed. This was not working at all correctly and is largely doing what 'find' does. 2. The functionality to get an element in a vector via an attribute call (i.e., self.vector1 == self.vector[1]) has been implemented this maintaining backwards compatibility with the regular Python stats. Change-Id: I31a4ccc723937018a3038dcdf491c82629ddbbb2
Change-Id: I6e1f4c01a52ae904e9a6c6582b5b413f94c1cb05
3be5ce3
to
c0a64c4
Compare
from .abstract_stat import * | ||
from .group import * | ||
from .jsonloader import * | ||
from .serializable_stat import * | ||
from .simstat import * | ||
from .statistic import * | ||
from .storagetype import * | ||
from .timeconversion import * |
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.
I really don't like this. From PEP008
Wildcard imports (from import *) should be avoided, as they make it unclear which names are present in the namespace, confusing both readers and many automated tools.
This PR incorporates numerous improvements and fixes to the gem5 PyStats. This includes:
simobjectvec[0]
. (This replaces theVector
group PyStat)SparseHist
PyStats.Vector2d
to PyStats.Distribution
PyStats is fixed to be a vector of Scalars.