Skip to content

Replacing the HAL module with a C implementation. - #4767

Merged
benvanik merged 4 commits into
mainfrom
benvanik-hal-c
Feb 11, 2021
Merged

benvanik merged 4 commits into
mainfrom
benvanik-hal-c

Conversation

@benvanik

@benvanik benvanik commented Feb 6, 2021 •

Copy link
Copy Markdown
Collaborator

A 30KB drop, removes all allocs from the common command buffer recording path, and almost all operations are faster to boot (no extraneous ref counting). There's a lot less C++ magic too: 1k loc of template magic replaced with 140 loc of stupid simple macros and autogeneratable boilerplate.

Existing iree-run-module:
image

New iree-run-module:
image

Note that iree-run-module thwarts LTO so this number is larger than something minimal (has all the string utils/etc). These measurements don't include it but a large majority of this is in rdata now whereas before it was constructed by code on the heap - so both binary footprint and memory footprint go down.

Fixes #4678.

@benvanik benvanik added the runtime Relating to the IREE runtime library label Feb 6, 2021
@google-cla google-cla Bot added the cla: yes label Feb 6, 2021
@benvanik
benvanik requested a review from ScottTodd February 6, 2021 08:05
@benvanik benvanik added the performance ⚡ Performance/optimization related work across the compiler and runtime label Feb 6, 2021
@benvanik
benvanik force-pushed the benvanik-hal-c branch 7 times, most recently from 07a93c4 to cbb5e8e Compare February 7, 2021 17:12
@benvanik
benvanik requested a review from marbre February 7, 2021 17:19
@benvanik
benvanik removed the request for review from marbre February 7, 2021 19:35
@benvanik
benvanik changed the base branch from benvanik-hal-index to benvanik-cconv February 7, 2021 19:35
@benvanik
benvanik force-pushed the benvanik-cconv branch 2 times, most recently from 832f912 to eb2ab14 Compare February 8, 2021 16:35
@benvanik
benvanik marked this pull request as ready for review February 8, 2021 17:15
Base automatically changed from benvanik-cconv to main February 11, 2021 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance ⚡ Performance/optimization related work across the compiler and runtime runtime Relating to the IREE runtime library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace C++ hal_module with C hal_module

2 participants