-
Notifications
You must be signed in to change notification settings - Fork 46
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
Decrease Stack Size #88
Conversation
I tested it on some of my kernels and it works safely. For me you would be free to merge. |
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.
For me it also looks good. Just a note about the systolic configuration:
systolic.mk
uses the default stack size (which now is going from 1024 to 512 bytes), but increases the size of the sequential memory per core (2048 bytes). This is because the first few words of each tile sequential region are allocated to Xqueue (https://github.com/pulp-platform/mempool/blob/main/software/runtime/crt0.S#L71-L74). Then the remaining sequential space not used by either Xqueue or the stack is allocated to the sequential heap (https://github.com/pulp-platform/mempool/blob/main/software/runtime/runtime.h#L79-L95).
The sequential heap is not heavily employed.. so to reduce memory waste in the systolic configuration too, I would reduce its sequential memory per core from 2048 to 1024 bytes.
c4ef9ff
to
0a7af83
Compare
Absolutely, I added this to the PR. |
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.
Good to merge for me :)
Make the L1 size a configurable parameter and decrease the default stack size to 512 bytes per core. This is plenty for the kernels I wrote and should easily be enough for most other kernels as well, but @mbertuletti, @yichao-zh, @sermazz, let me know what you think as well.
Changelog
Changed
Checklist