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

Explicitly use the current device resource in DeviceBuffer #1514

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

wence-
Copy link
Contributor

@wence- wence- commented Apr 2, 2024

Description

Previously we were relying on the C++ and Python-level device resources to agree. But this need not be the case.

To avoid this, first get the current device resource and then use it when allocating the wrapped C++ device_buffer when creating DeviceBuffers.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@wence-
Copy link
Contributor Author

wence- commented Apr 2, 2024

#1515 tracks the broader issue

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.

Thanks for fixing this!

Previously we were relying on the C++ and Python-level device
resources to agree. But this need not be the case.

To avoid this, first get the current deivce resource and then use it
when allocating the wrapped C++ device_buffer when creating
DeviceBuffers.

- Closes rapidsai#1506
@wence-
Copy link
Contributor Author

wence- commented Apr 3, 2024

/merge

@rapids-bot rapids-bot bot merged commit 8675b2c into rapidsai:branch-24.06 Apr 3, 2024
52 checks passed
@wence- wence- deleted the wence/fix/1506-partial branch April 3, 2024 14:51
@harrism
Copy link
Member

harrism commented Apr 4, 2024

In general I prefer to have two reviews / approvals. Especially when I am the only one to approve the Python (I'm an amateur Python programmer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change Python Related to RMM Python API
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] When using rmm_cupy_allocator with Cupy, the memory resource is constructed twice.
2 participants