Skip to content

Make the grow-only resource stream ordered.#12185

Merged
trivialfis merged 1 commit into
dmlc:masterfrom
trivialfis:sync-grow-only
Apr 28, 2026
Merged

Make the grow-only resource stream ordered.#12185
trivialfis merged 1 commit into
dmlc:masterfrom
trivialfis:sync-grow-only

Conversation

@trivialfis
Copy link
Copy Markdown
Member

@trivialfis trivialfis commented Apr 27, 2026

Continued work on fixing the RMM failure.

related: #12122

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 GrowOnlyVirtualMemVec growth 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.

@trivialfis trivialfis merged commit d46abbe into dmlc:master Apr 28, 2026
84 checks passed
@trivialfis trivialfis deleted the sync-grow-only branch April 28, 2026 13:08
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.

3 participants