Make the grow-only resource stream ordered.#12185
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the CUDA/RMM failure investigation by making grow-only virtual-memory growth explicitly ordered with respect to a CUDA stream, and by updating the unit test to use consistent stream semantics when resizing and copying.
Changes:
- Add a stream parameter to
CudaGrowOnlyResource::Resize()and plumb it into the underlying grow-only virtual-memory allocator. - Update
GrowOnlyVirtualMemVecgrowth to synchronize the caller’s stream before unmapping/remapping in the slow-path growth case. - Fix the CUDA grow-only resource test to use the same stream for resize, memcpy, and synchronization.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/cpp/common/test_ref_resource_view.cu | Uses an explicit CUDA stream for resize + memcpy and synchronizes before validating host results. |
| src/common/resource.cuh | Extends CudaGrowOnlyResource::Resize to accept a stream and forwards it to the allocator. |
| src/common/device_vector.cuh | Threads a stream through grow-only virtual-memory growth so slow-path remapping can be ordered. |
| src/common/device_vector.cu | Synchronizes the provided stream before unmapping/remapping virtual addresses in the slow-path reserve. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RAMitchell
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Continued work on fixing the RMM failure.
related: #12122