Skip to content

Serialize RMM device buffers without numba - #9394

Merged
TomAugspurger merged 1 commit into
dask:mainfrom
brandon-b-miller:bbm/rmm-serializer-drop-numba
Nov 20, 2026
Merged

TomAugspurger merged 1 commit into
dask:mainfrom
brandon-b-miller:bbm/rmm-serializer-drop-numba

Conversation

@brandon-b-miller

Copy link
Copy Markdown
Contributor

RMM can natively serialize buffers, theres no need to carry a legacy numba-cuda testing dependency especially as legacy numba-cuda is now in maintenance mode.

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.
@github-actions

Copy link
Copy Markdown
Contributor

Unit Test Results

See 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
 4 160 tests ±0   3 982 ✅ +1    178 💤 ±0  0 ❌  - 1 
80 960 runs  +2  76 721 ✅ +1  4 239 💤 +2  0 ❌  - 1 

Results for commit 29f350b. ± Comparison against base commit d54498b.

@TomAugspurger TomAugspurger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks.

@TomAugspurger
TomAugspurger merged commit fea1d78 into dask:main Nov 20, 2026
49 of 54 checks passed
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.

2 participants