Repository navigation
Small tweaks to reduce the total size of iree_hal_dispatch_cmd_t. - #5513
Merged
Merged
Conversation
benvanik
marked this pull request as ready for review
April 19, 2021 05:32
benvanik
commented
Apr 19, 2021
ScottTodd
approved these changes
Apr 19, 2021
It now lives on the shards themselves as their lifetime is much shorter than the dispatch (which may be recorded into a command buffer much earlier).
They are easy to recompute and this helps keep the command buffer size smaller.
benvanik
force-pushed
the
benvanik-shrink-cmd
branch
from
April 19, 2021 16:28
ad97ec6 to
5816c57
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This drops our total command buffer usage from ~290KB in BERT to ~205KB (on ptr size == 64-bit systems - lots of that 205KB is pointers so will be ~half on ptr size == 32-bit devices). There's still some stuff that could be trimmed but at some point the best thing to do is emit fewer dispatches/barriers/etc from the compiler :)