Skip to content

Remove the ExternalBuffer class and use Buffer instead. - #11152

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_976559332
Open

Remove the ExternalBuffer class and use Buffer instead.#11152
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_976559332

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Remove the ExternalBuffer class and use Buffer instead.

This removes a helper class to reuse the existing buffers, allowing to
directly share a buffer from another source instead of manually trying
to keep track of views and copied buffers.

This also allows us to lock the buffers when needed and only keep them
locked for the duration of a run. Previously we would lock a buffer,
keep it as a view and unlock it, which is a bug and only worked for data
that resides in the host memory.

This removes a helper class to reuse the existing buffers, allowing to
directly share a buffer from another source instead of manually trying
to keep track of views and copied buffers.

This also allows us to lock the buffers when needed and only keep them
locked for the duration of a run. Previously we would lock a buffer,
keep it as a view and unlock it, which is a bug and only worked for data
that resides in the host memory.

PiperOrigin-RevId: 976559332
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