Skip to content
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

Add functions to preallocate pools and release unused pool memory #4563

Merged
merged 15 commits into from
Jan 17, 2023

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Jan 12, 2023

Category:

New feature
Refactoring

Description:

This PR adds global C++, C and Python bindings to functions that

  • free unused memory from memory pools
  • preallocate device or host-pinned memory pool

There's also a refactoring:

  • pool_resource_base is renamed to pool_resource (there hardly any inheritance from it) and a new base class is added (with just virtual functions)

Additional information:

Affected modules and functionalities:

mm/default_resources
C API
backend_impl

Key points relevant for the review:

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: DALI-3170

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6999896]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [6999896]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7000985]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7000985]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7009051]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7009185]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7009185]: BUILD FAILED

mzient and others added 12 commits January 16, 2023 10:46
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7025765]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7025765]: BUILD FAILED

Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7027461]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7027461]: BUILD FAILED

… CUDA VM memory resource.

Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7032456]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [7032456]: BUILD PASSED

@mzient mzient merged commit 9a4f5cd into NVIDIA:main Jan 17, 2023
aderylo pushed a commit to zpp-dali-2022/DALI that referenced this pull request Mar 17, 2023
…IDIA#4563)

* Add a base class that exposes common memory pool functions.
* Add preallocation.
* Add tests for ReleaseUnused.
* Add C and python bindings.
* Add documentation.
* Fix malloc resource device_id handling.
* Disable full ReleaseUnused test and preallocation test when not using CUDA VM memory resource.

Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@JanuszL JanuszL mentioned this pull request Sep 6, 2023
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.

4 participants