Skip to content
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

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

BobbyRBruce
Copy link
Member

@BobbyRBruce BobbyRBruce commented Apr 5, 2024

This PR incorporates numerous improvements and fixes to the gem5 PyStats. This includes:

  • PyStats now support SimObject Vectors. The PyStats representing them are subscribable and therefore acceptable by accessing an index: e.g.,: simobjectvec[0]. (This replaces the Vector group PyStat)
  • Adds the SparseHist PyStats.
  • Adds the Vector2d to PyStats.
  • The Distribution PyStats is fixed to be a vector of Scalars.
  • Tests added for the PyStat's Vector and bugs fixed.

@BobbyRBruce BobbyRBruce added stats The gem5 statistics code and related infrastructure stdlib The gem5 standard library. Code typically found under "src/pythongem5" labels Apr 5, 2024
@BobbyRBruce BobbyRBruce force-pushed the vector-fixes-and-improvements branch 4 times, most recently from a9665f0 to d842e35 Compare April 5, 2024 21:15
@powerjg powerjg added this to the v24.0 milestone Apr 11, 2024
@BobbyRBruce BobbyRBruce force-pushed the vector-fixes-and-improvements branch 7 times, most recently from fd4a537 to 261c501 Compare April 29, 2024 14:23
@BobbyRBruce BobbyRBruce force-pushed the vector-fixes-and-improvements branch 4 times, most recently from ee2d4f0 to 7fa7584 Compare May 2, 2024 12:19
@BobbyRBruce BobbyRBruce force-pushed the vector-fixes-and-improvements branch 7 times, most recently from e893be9 to a1c6b37 Compare May 20, 2024 11:50
@BobbyRBruce BobbyRBruce marked this pull request as ready for review May 20, 2024 11:51
@BobbyRBruce BobbyRBruce force-pushed the vector-fixes-and-improvements branch 2 times, most recently from 7dd21a7 to 515dac4 Compare May 20, 2024 13:59
@Harshil2107 Harshil2107 force-pushed the vector-fixes-and-improvements branch from 515dac4 to 350ef31 Compare May 21, 2024 19:47
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
@BobbyRBruce BobbyRBruce force-pushed the vector-fixes-and-improvements branch from 350ef31 to 0f6bd24 Compare May 23, 2024 21:55
@BobbyRBruce
Copy link
Member Author

I believe I've fixed the failing tests. This should be ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stats The gem5 statistics code and related infrastructure stdlib The gem5 standard library. Code typically found under "src/pythongem5"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants