Repository navigation
Serialize RMM device buffers without numba - #9394
Merged
TomAugspurger merged 1 commit intoNov 20, 2026
Merged
Conversation
The dask serializer reached through numba to copy a DeviceBuffer to the
host:
frames = [numba.cuda.as_cuda_array(f).copy_to_host().data
for f in frames]
`f` is already an `rmm.DeviceBuffer`, which has had `copy_to_host` since
it gained `__cuda_array_interface__`, so the round trip through a JIT
compiler bought nothing. Calling it directly returns the same numpy
array and the same memoryview from `.data`, which is what the dask
serializer asserts frames are.
The test filled its buffer the same way, via `cuda.to_device(x_np,
to=cuda.as_cuda_array(x))`; `DeviceBuffer.copy_from_host` does that
directly.
Nothing else in either file used numba, so this drops the dependency
from the RMM serialization path entirely. Verified by running the tests
with `numba` made unimportable: 9 passed.
Contributor
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 40 files ±0 40 suites ±0 13h 52m 20s ⏱️ + 39m 25s Results for commit 29f350b. ± Comparison against base commit d54498b. |
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.
RMM can natively serialize buffers, theres no need to carry a legacy
numba-cudatesting dependency especially as legacynumba-cudais now in maintenance mode.