-
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
Adding Spatter #1136
base: develop
Are you sure you want to change the base?
Adding Spatter #1136
Conversation
I know this is a draft, but a few quick comments:
|
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.
Overall, this looks great. I didn't check the logic carefully in spatter_gen.cc
, but I trust you've tested this and compared with upstream spatter.
Most of my comments are style. The only "big" thing that I would like to see changed is moving the state information into the SpatterGen
class to make it private.
One thing to keep in mind when pushing code upstream is that you should try to make things as self-contained as possible. Don't expose things publicly unless absolutely required.
Finally, there are some places where you need to add more documentation. Think about how someone would discover how to use this if they don't know anything about Spatter and they are not involved in our project.
01e29f7
to
26c79d0
Compare
src/python/gem5/components/processors/spatter_gen/spatter_kernel.py
Outdated
Show resolved
Hide resolved
3af10ab
to
a918732
Compare
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 more little things
cd6aa29
to
2acff81
Compare
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.
Looks good to me. Thanks for the updates!
@giactra This is ready for review. |
9af8e3c
to
2f08a3a
Compare
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.
There's a merge/rebase issue here.
I think it should be fixed now. |
@giactra let me know if you want us to hold off merging until you have time to 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.
Thanks @powerjg, I am not going to do a full functionality check assuming it has been tested and works properly already. I only wanted to make sure the code was properly documented (that's the main comment I have if you see below). Also some minor comments on the code from a SW engineering point of view
using enums::SpatterKernelType; | ||
using enums::SpatterProcessingMode; | ||
|
||
class SpatterGen: public ClockedObject |
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 appreciate there is a reference to the publication in the SpatterGen.py file, but I believe it would be beneficial for a user to have a brief description of Spatter classes and what they are actually doing, so that a user is not "forced" to read the paper, especially if the paper requires a subscription
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.
Would the documentation in spatter_kernel.py suffice? I am now looking at writing it up and wonder if I should extend what is already there.
This change adds source code for SpatterGen ClockedObject. The set of source code pushed includes code for SpatterKernel that tracks whether information is being gathered or scattered as well as the list of indices to be accessed. This model has PyBindMethod to add SpatterKernels from python. This way all the preparations for kernels can be done in python. SpatterGen has a few parameters that model limits on a few of hardware resources in the backend of a processor, e.g. number of functional units to calculate effective address, the latency of calculating effective address, number of integer registers. Change-Id: I451ffb385180a914e884cab220928c5f1944b2e3
This change adds code for SpatterGenCore and SpatterGen as well as SpatterKernel to the standard library. SpatterGenCore and SpatterGen follow the same structure as AbstractCore and AbstractProcessor. spatter_kernel.py adds utility functions to parse dictionaries as well as partition a list into multiple lists through interleaving to be used when setting up a multicore SpatterGen. Change-Id: I003553e97f901c0724f5feac0bb6e21a020bd6ad
This PR adds source code for C++ implementation of SpatterGen as well as SpatterKernel. SpatterGen uses a PyBindMethod to add kernels to the backend code. This way the process of processing json files could be offloaded to python. In addition it adds standard library components for SpatterGenCore and SpatterGen. These two components follow the same structure as AbstractCore and AbstractProcessor. In addition spatter_kernel.py adds a definition for SpatterKernel in python to make adding kernels to C++ easier. Also it adds utility functions for parsing dictionaries read from json as well as partitioning traces for multicore setups.