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

Update RMM tests based on deprecated CNMeM #359

Merged
merged 4 commits into from
Aug 12, 2020

Conversation

jakirkham
Copy link
Member

The recent RMM PR ( rapidsai/rmm#466 ) deprecated CNMeM and made some changes for handling memory resources for multiple devices (needed by XGBoost). As a result, we are seeing a few test failures in Dask-CUDA. This makes the necessary changes to update these tests.

As `get_default_resource_type` was dropped in RMM recently, use the
newly introduce `rmm.mr.get_per_device_resource` instead to access the
resource on device `0` (configured to a unique device for each worker).
Since the memory resource itself is not realistically serializable,
instead grab the type of each resource to send back. This is all done
within a `lambda` to allow for a function that can be run on each
worker.
As CNMeM has been dropped from Python and replaced with RMM's own pool
resource, just check for that pool resource instead.
@jakirkham jakirkham requested a review from a team as a code owner August 12, 2020 02:52
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a function for that. :)

Simplify the resource type checks a bit. Thanks Mark! :)

Co-authored-by: Mark Harris <[email protected]>
@jakirkham
Copy link
Member Author

Much cleaner. Thanks Mark! :)

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2020

Codecov Report

Merging #359 into branch-0.15 will increase coverage by 0.39%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.15     #359      +/-   ##
===============================================
+ Coverage        59.65%   60.04%   +0.39%     
===============================================
  Files               17       17              
  Lines             1321     1334      +13     
===============================================
+ Hits               788      801      +13     
  Misses             533      533              
Impacted Files Coverage Δ
dask_cuda/device_host_file.py 98.64% <0.00%> (+0.03%) ⬆️
dask_cuda/cli/dask_cuda_worker.py 96.77% <0.00%> (+0.05%) ⬆️
dask_cuda/initialize.py 92.59% <0.00%> (+0.28%) ⬆️
dask_cuda/_version.py 44.80% <0.00%> (+0.39%) ⬆️
dask_cuda/is_device_object.py 88.88% <0.00%> (+3.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f06e05...cd4b9ac. Read the comment docs.

This was referenced Aug 12, 2020
Copy link
Member

@pentschev pentschev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @jakirkham !

@pentschev pentschev merged commit 859ea21 into rapidsai:branch-0.15 Aug 12, 2020
@jakirkham jakirkham deleted the fix_mr_tsts_cnmem_dep branch August 13, 2020 07:26
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