Skip to content

[AsyncAlloc][SYCL] Introduce trim_to to memory_pool to trim memory allocated to a memory pool #17907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

Seanst98
Copy link
Contributor

@Seanst98 Seanst98 commented Apr 8, 2025

Introduce the memory_pool member function trim_to which explicitly trims allocated memory for a memory_pool. It takes a single parameter which specifies the number of bytes to keep after the trimming operation.

The implementation may or may not trim down to the specified number of bytes, and will not trim memory that is allocated to ptrs for the user.

This PR is a draft until the feature has been added to the sycl_ext_oneapi_async_memory_alloc spec.

allocated to a memory pool

Introduce the memory_pool member function trim_to which explicitly trims
allocated memory for a memory_pool. It takes a single parameter which
specifies the number of bytes to keep after the trimming operation.

The implementation may or may not trim down to the specified number of
bytes, and will not trim memory that is allocated to ptrs for the user.
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