Skip to content

feat(hal): implement functions to normalize buffer references and buffer bindings to subspan buffers#24472

Open
schuermans-roofline wants to merge 1 commit into
iree-org:mainfrom
schuermans-roofline:buffer_ref_binding_normalize
Open

feat(hal): implement functions to normalize buffer references and buffer bindings to subspan buffers#24472
schuermans-roofline wants to merge 1 commit into
iree-org:mainfrom
schuermans-roofline:buffer_ref_binding_normalize

Conversation

@schuermans-roofline
Copy link
Copy Markdown
Contributor

Buffer references and bindings can point to subspans of buffers. HAL drivers need to handle this case and access the actual memory allocation in the underlying allocated buffer. This can be handled by normalizing buffer references and buffer bindings before processing those. Normalization means to replace the reference to (a part of) a subspan buffer with a reference to the corresponding part of the underlying allocated buffer in the buffer reference or buffer binding.

This change provides functions that perform those normalizations as helpers/infrastructure for HAL drivers.

@schuermans-roofline schuermans-roofline force-pushed the buffer_ref_binding_normalize branch 2 times, most recently from 7d09d90 to eb829f1 Compare May 13, 2026 08:20
…fer bindings to subspan buffers

Buffer references and bindings can point to subspans of buffers. HAL drivers
need to handle this case and access the actual memory allocation in the
underlying allocated buffer. This can be handled by normalizing buffer
references and buffer bindings before processing those. Normalization means to
replace the reference to (a part of) a subspan buffer with a reference to the
corresponding part of the underlying allocated buffer in the buffer reference
or buffer binding.

This change provides functions that perform those normalizations as
helpers/infrastructure for HAL drivers.

Signed-off-by: Stefan Schuermans <schuermans@roofline.ai>
@schuermans-roofline schuermans-roofline force-pushed the buffer_ref_binding_normalize branch from eb829f1 to 652923f Compare May 18, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant