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

[FEA] Add Cython bindings for tracking_resource_adaptor #623

Closed
harrism opened this issue Nov 2, 2020 · 4 comments · Fixed by #626
Closed

[FEA] Add Cython bindings for tracking_resource_adaptor #623

harrism opened this issue Nov 2, 2020 · 4 comments · Fixed by #626
Labels
feature request New feature or request inactive-30d Python Related to RMM Python API

Comments

@harrism
Copy link
Member

harrism commented Nov 2, 2020

For the cuml team, it would be really helpful if Cython bindings could be added to the `tracking_resource_adaptor. (@mdemoret-nv suggested maybe he can make the changes).

Split off from #622

Originally posted by @mdemoret-nv in #596 (comment). See https://github.com/rapidsai/cuml so I made something very similar (even named it very closely): branch-0.17...mdemoret-nv:enh-add-callback-memory-manager

@github-actions
Copy link

This issue has been marked rotten due to no recent activity in the past 90d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

@github-actions
Copy link

This issue has been marked stale due to no recent activity in the past 30d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be marked rotten if there is no activity in the next 60d.

@harrism
Copy link
Member Author

harrism commented Feb 16, 2021

Still relevant and being worked in #626

@github-actions
Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

@rapids-bot rapids-bot bot closed this as completed in #626 Jun 8, 2021
rapids-bot bot pushed a commit that referenced this issue Jun 8, 2021
…urce_adaptor` and `statistics_resource_adaptor` (#626)

Closes #622 and Closes #623 

This PR updates the C++ `tracking_resource_adaptor` with stack trace information and also adds a new MR, `statistics_resource_adaptor`. Summary of all changes:

- `tracking_resource_adaptor` changes:
   - Added Cython wrapper `rmm.mr.TrackingResourceAdaptor` which wraps all available methods
   - Updated `tracking_resource_adaptor` to correctly log stack trace information with `capture_stacks=True`
- Added `statistics_resource_adaptor` memory resource:
   - This MR will keep track of the current, peak and total allocated bytes and number of allocations
   - Added Cython wrapper `rmm.mr.StatisticsResourceAdaptor` which wraps all available methods

These two MR can be used separately and together to track memory allocations, check for memory leaks, and identify incorrect deallocations. While both MRs can track the current number of allocations, they have different areas of focus. 

The `tracking_resource_adaptor` is designed more towards identifying and fixing memory leaks, and will log stack trace information for every memory allocation. This MR will have significant performance impacts since it logs a large amount of information for every allocation. 

The `statistics_resource_adaptor` is a lightweight MR that adds simple counters to track the allocated bytes and allocation count. This MR will have significantly less of a performance impact but cannot identify the cause of memory leaks, only that they exist. This MR is also great at tracking peak memory usage and can be helpful in identifying areas that require large amounts of memory or helping developers measure memory usage reductions during optimization.

Authors:
  - Michael Demoret (https://github.com/mdemoret-nv)

Approvers:
  - Keith Kraus (https://github.com/kkraus14)
  - Rong Ou (https://github.com/rongou)
  - Mark Harris (https://github.com/harrism)
  - Jake Hemstad (https://github.com/jrhemstad)
  - GALI PREM SAGAR (https://github.com/galipremsagar)

URL: #626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request inactive-30d Python Related to RMM Python API
Projects
None yet
1 participant