Skip to content

Small improvements to enable buffer aliasing/importing. - #5511

Merged
benvanik merged 2 commits into
mainfrom
benvanik-buffer-improvements
Apr 19, 2021
Merged

benvanik merged 2 commits into
mainfrom
benvanik-buffer-improvements

Conversation

@benvanik

Copy link
Copy Markdown
Collaborator

This adds the flags and populates them but the first real usage will come in #5472.

This allows allocators to differentiate between whether it can allocate
a new buffer of a specified type and whether it can import/reuse one from
the system. Future handle-based import/export APIs will use this.
This enables us to know the source of a byte buffer without trusting
modules about its lifetime guarantees. A byte buffer that has a lifetime
of the entire module can safely be aliased as by construction it will
outlive any use from the module while allocated or external buffers
may not have the same guarantees.
@benvanik benvanik added hal/api IREE's public C hardware abstraction layer API runtime/vm IREE bytecode VM interpreter labels Apr 19, 2021
@benvanik
benvanik requested a review from ScottTodd April 19, 2021 03:27
@google-cla google-cla Bot added the cla: yes label Apr 19, 2021
@benvanik

Copy link
Copy Markdown
Collaborator Author

(you reviewed this in #5472 originally - I just pulled these independent bits out so that they can land now while work on that PR continues)

@benvanik
benvanik merged commit ad8afdd into main Apr 19, 2021
@benvanik
benvanik deleted the benvanik-buffer-improvements branch April 19, 2021 16:12
@hanhanW hanhanW mentioned this pull request Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hal/api IREE's public C hardware abstraction layer API runtime/vm IREE bytecode VM interpreter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants