Skip to content

Small tweaks to reduce the total size of iree_hal_dispatch_cmd_t. - #5513

Merged
benvanik merged 3 commits into
mainfrom
benvanik-shrink-cmd
Apr 19, 2021
Merged

benvanik merged 3 commits into
mainfrom
benvanik-shrink-cmd

Conversation

@benvanik

@benvanik benvanik commented Apr 19, 2021 •

Copy link
Copy Markdown
Collaborator

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 :)

@benvanik benvanik added performance ⚡ Performance/optimization related work across the compiler and runtime hal/cpu Runtime Host/CPU-based HAL backend labels Apr 19, 2021
@benvanik
benvanik requested a review from ScottTodd April 19, 2021 05:03
@google-cla google-cla Bot added the cla: yes label Apr 19, 2021
@benvanik
benvanik marked this pull request as ready for review April 19, 2021 05:32
Comment thread iree/hal/local/task_command_buffer.c Resolved
Comment thread iree/task/task.c Resolved
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
benvanik force-pushed the benvanik-shrink-cmd branch from ad97ec6 to 5816c57 Compare April 19, 2021 16:28
@benvanik
benvanik merged commit 74be346 into main Apr 19, 2021
@benvanik
benvanik deleted the benvanik-shrink-cmd branch April 19, 2021 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hal/cpu Runtime Host/CPU-based HAL backend performance ⚡ Performance/optimization related work across the compiler and runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants