Add release_unused
function to memory pools.
#4556
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Michal Zientkiewicz michalz@nvidia.com
Category:
New feature (non-breaking change which adds functionality)
Description:
As per user-request, this adds the functionality necessary to implement memory "garbage collection".
Internally, there are three implementations:
release_unused
on it.free_mapped
. The virtual address space is not a concern and is never freed.The relevant changes in public APIs are not in the scope of this PR - it just implements the underlying functionality
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Existing pool tests were extended by inserting a call to
release_unused
halfway through the test.cuda_vm_resource
received a new test, since this functionality is otherwise not tested, whereas other a regular pool may userelease_unused_impl
to reclaim memory before allocating a new block from upstream..Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-3170