dask-cuda 25.6.0__py3-none-any.whl → 25.8.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. dask_cuda/GIT_COMMIT +1 -1
  2. dask_cuda/VERSION +1 -1
  3. dask_cuda/benchmarks/common.py +4 -1
  4. dask_cuda/benchmarks/local_cudf_groupby.py +4 -1
  5. dask_cuda/benchmarks/local_cudf_merge.py +5 -2
  6. dask_cuda/benchmarks/local_cudf_shuffle.py +5 -2
  7. dask_cuda/benchmarks/local_cupy.py +4 -1
  8. dask_cuda/benchmarks/local_cupy_map_overlap.py +4 -1
  9. dask_cuda/benchmarks/utils.py +7 -4
  10. dask_cuda/cli.py +21 -15
  11. dask_cuda/cuda_worker.py +27 -57
  12. dask_cuda/device_host_file.py +31 -15
  13. dask_cuda/disk_io.py +7 -4
  14. dask_cuda/explicit_comms/comms.py +11 -7
  15. dask_cuda/explicit_comms/dataframe/shuffle.py +23 -23
  16. dask_cuda/get_device_memory_objects.py +3 -3
  17. dask_cuda/initialize.py +80 -44
  18. dask_cuda/local_cuda_cluster.py +63 -66
  19. dask_cuda/plugins.py +17 -16
  20. dask_cuda/proxify_device_objects.py +12 -10
  21. dask_cuda/proxify_host_file.py +30 -27
  22. dask_cuda/proxy_object.py +20 -17
  23. dask_cuda/tests/conftest.py +41 -0
  24. dask_cuda/tests/test_dask_cuda_worker.py +109 -25
  25. dask_cuda/tests/test_dgx.py +10 -18
  26. dask_cuda/tests/test_explicit_comms.py +30 -12
  27. dask_cuda/tests/test_from_array.py +7 -5
  28. dask_cuda/tests/test_initialize.py +16 -37
  29. dask_cuda/tests/test_local_cuda_cluster.py +159 -52
  30. dask_cuda/tests/test_proxify_host_file.py +19 -3
  31. dask_cuda/tests/test_proxy.py +18 -16
  32. dask_cuda/tests/test_rdd_ucx.py +160 -0
  33. dask_cuda/tests/test_spill.py +7 -0
  34. dask_cuda/tests/test_utils.py +106 -20
  35. dask_cuda/tests/test_worker_spec.py +5 -2
  36. dask_cuda/utils.py +261 -38
  37. dask_cuda/utils_test.py +23 -7
  38. dask_cuda/worker_common.py +196 -0
  39. dask_cuda/worker_spec.py +12 -5
  40. {dask_cuda-25.6.0.dist-info → dask_cuda-25.8.0.dist-info}/METADATA +2 -2
  41. dask_cuda-25.8.0.dist-info/RECORD +63 -0
  42. dask_cuda-25.8.0.dist-info/top_level.txt +6 -0
  43. shared-actions/check_nightly_success/check-nightly-success/check.py +148 -0
  44. shared-actions/telemetry-impls/summarize/bump_time.py +54 -0
  45. shared-actions/telemetry-impls/summarize/send_trace.py +409 -0
  46. dask_cuda-25.6.0.dist-info/RECORD +0 -57
  47. dask_cuda-25.6.0.dist-info/top_level.txt +0 -4
  48. {dask_cuda-25.6.0.dist-info → dask_cuda-25.8.0.dist-info}/WHEEL +0 -0
  49. {dask_cuda-25.6.0.dist-info → dask_cuda-25.8.0.dist-info}/entry_points.txt +0 -0
  50. {dask_cuda-25.6.0.dist-info → dask_cuda-25.8.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,3 +1,6 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION & AFFILIATES.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import multiprocessing as mp
2
5
  import os
3
6
  from enum import Enum, auto
@@ -10,6 +13,7 @@ from distributed import Client
10
13
 
11
14
  from dask_cuda import LocalCUDACluster
12
15
  from dask_cuda.initialize import initialize
16
+ from dask_cuda.utils_test import get_ucx_implementation
13
17
 
14
18
  mp = mp.get_context("spawn") # type: ignore
15
19
  psutil = pytest.importorskip("psutil")
@@ -78,10 +82,7 @@ def test_default():
78
82
 
79
83
 
80
84
  def _test_tcp_over_ucx(protocol):
81
- if protocol == "ucx":
82
- ucp = pytest.importorskip("ucp")
83
- elif protocol == "ucxx":
84
- ucp = pytest.importorskip("ucxx")
85
+ ucp = get_ucx_implementation(protocol)
85
86
 
86
87
  with LocalCUDACluster(protocol=protocol, enable_tcp_over_ucx=True) as cluster:
87
88
  with Client(cluster) as client:
@@ -102,13 +103,10 @@ def _test_tcp_over_ucx(protocol):
102
103
 
103
104
  @pytest.mark.parametrize(
104
105
  "protocol",
105
- ["ucx", "ucxx"],
106
+ ["ucx", "ucx-old"],
106
107
  )
107
108
  def test_tcp_over_ucx(protocol):
108
- if protocol == "ucx":
109
- ucp = pytest.importorskip("ucp")
110
- elif protocol == "ucxx":
111
- ucp = pytest.importorskip("ucxx")
109
+ ucp = get_ucx_implementation(protocol)
112
110
  if _is_ucx_116(ucp):
113
111
  pytest.skip("https://github.com/rapidsai/ucx-py/issues/1037")
114
112
 
@@ -137,10 +135,7 @@ def _test_ucx_infiniband_nvlink(
137
135
  skip_queue, protocol, enable_infiniband, enable_nvlink, enable_rdmacm
138
136
  ):
139
137
  cupy = pytest.importorskip("cupy")
140
- if protocol == "ucx":
141
- ucp = pytest.importorskip("ucp")
142
- elif protocol == "ucxx":
143
- ucp = pytest.importorskip("ucxx")
138
+ ucp = get_ucx_implementation(protocol)
144
139
 
145
140
  if enable_infiniband and not any(
146
141
  [at.startswith("rc") for at in ucp.get_active_transports()]
@@ -206,7 +201,7 @@ def _test_ucx_infiniband_nvlink(
206
201
  assert all(client.run(check_ucx_options).values())
207
202
 
208
203
 
209
- @pytest.mark.parametrize("protocol", ["ucx", "ucxx"])
204
+ @pytest.mark.parametrize("protocol", ["ucx", "ucx-old"])
210
205
  @pytest.mark.parametrize(
211
206
  "params",
212
207
  [
@@ -222,10 +217,7 @@ def _test_ucx_infiniband_nvlink(
222
217
  reason="Automatic InfiniBand device detection Unsupported for %s" % _get_dgx_name(),
223
218
  )
224
219
  def test_ucx_infiniband_nvlink(protocol, params):
225
- if protocol == "ucx":
226
- ucp = pytest.importorskip("ucp")
227
- elif protocol == "ucxx":
228
- ucp = pytest.importorskip("ucxx")
220
+ ucp = get_ucx_implementation(protocol)
229
221
  if _is_ucx_116(ucp) and params["enable_infiniband"] is False:
230
222
  pytest.skip("https://github.com/rapidsai/ucx-py/issues/1037")
231
223
 
@@ -1,4 +1,5 @@
1
- # Copyright (c) 2021-2025 NVIDIA CORPORATION.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION & AFFILIATES.
2
+ # SPDX-License-Identifier: Apache-2.0
2
3
 
3
4
  import asyncio
4
5
  import multiprocessing as mp
@@ -25,7 +26,7 @@ from dask_cuda.explicit_comms.dataframe.shuffle import (
25
26
  _contains_shuffle_expr,
26
27
  shuffle as explicit_comms_shuffle,
27
28
  )
28
- from dask_cuda.utils_test import IncreasedCloseTimeoutNanny
29
+ from dask_cuda.utils_test import IncreasedCloseTimeoutNanny, get_ucx_implementation
29
30
 
30
31
  mp = mp.get_context("spawn") # type: ignore
31
32
  ucp = pytest.importorskip("ucp")
@@ -53,8 +54,10 @@ def _test_local_cluster(protocol):
53
54
  assert sum(c.run(my_rank, 0)) == sum(range(4))
54
55
 
55
56
 
56
- @pytest.mark.parametrize("protocol", ["tcp", "ucx", "ucxx"])
57
+ @pytest.mark.parametrize("protocol", ["tcp", "ucx", "ucx-old"])
57
58
  def test_local_cluster(protocol):
59
+ if protocol.startswith("ucx"):
60
+ get_ucx_implementation(protocol)
58
61
  p = mp.Process(target=_test_local_cluster, args=(protocol,))
59
62
  p.start()
60
63
  p.join()
@@ -97,7 +100,7 @@ def test_dataframe_merge_empty_partitions():
97
100
 
98
101
 
99
102
  def check_partitions(df, npartitions):
100
- """Check that all values in `df` hashes to the same"""
103
+ """Check that all values in ``df`` hashes to the same"""
101
104
  dtypes = {}
102
105
  for col, dtype in df.dtypes.items():
103
106
  if pd.api.types.is_numeric_dtype(dtype):
@@ -199,11 +202,13 @@ def _test_dataframe_shuffle(backend, protocol, n_workers, _partitions):
199
202
 
200
203
  @pytest.mark.parametrize("nworkers", [1, 2, 3])
201
204
  @pytest.mark.parametrize("backend", ["pandas", "cudf"])
202
- @pytest.mark.parametrize("protocol", ["tcp", "ucx", "ucxx"])
205
+ @pytest.mark.parametrize("protocol", ["tcp", "ucx", "ucx-old"])
203
206
  @pytest.mark.parametrize("_partitions", [True, False])
204
207
  def test_dataframe_shuffle(backend, protocol, nworkers, _partitions):
205
208
  if backend == "cudf":
206
209
  pytest.importorskip("cudf")
210
+ if protocol.startswith("ucx"):
211
+ get_ucx_implementation(protocol)
207
212
 
208
213
  p = mp.Process(
209
214
  target=_test_dataframe_shuffle, args=(backend, protocol, nworkers, _partitions)
@@ -320,10 +325,12 @@ def _test_dataframe_shuffle_merge(backend, protocol, n_workers):
320
325
 
321
326
  @pytest.mark.parametrize("nworkers", [1, 2, 4])
322
327
  @pytest.mark.parametrize("backend", ["pandas", "cudf"])
323
- @pytest.mark.parametrize("protocol", ["tcp", "ucx", "ucxx"])
328
+ @pytest.mark.parametrize("protocol", ["tcp", "ucx", "ucx-old"])
324
329
  def test_dataframe_shuffle_merge(backend, protocol, nworkers):
325
330
  if backend == "cudf":
326
331
  pytest.importorskip("cudf")
332
+ if protocol.startswith("ucx"):
333
+ get_ucx_implementation(protocol)
327
334
  p = mp.Process(
328
335
  target=_test_dataframe_shuffle_merge, args=(backend, protocol, nworkers)
329
336
  )
@@ -357,9 +364,14 @@ def _test_jit_unspill(protocol):
357
364
  assert_eq(got, expected)
358
365
 
359
366
 
360
- @pytest.mark.parametrize("protocol", ["tcp", "ucx", "ucxx"])
367
+ @pytest.mark.parametrize("protocol", ["tcp", "ucx", "ucx-old"])
368
+ @pytest.mark.skip_if_no_device_memory(
369
+ "JIT-Unspill not supported in devices without dedicated memory resource"
370
+ )
361
371
  def test_jit_unspill(protocol):
362
372
  pytest.importorskip("cudf")
373
+ if protocol.startswith("ucx"):
374
+ get_ucx_implementation(protocol)
363
375
 
364
376
  p = mp.Process(target=_test_jit_unspill, args=(protocol,))
365
377
  p.start()
@@ -384,7 +396,7 @@ def _test_lock_workers(scheduler_address, ranks):
384
396
 
385
397
  def test_lock_workers():
386
398
  """
387
- Testing `run(...,lock_workers=True)` by spawning 30 runs with overlapping
399
+ Testing ``run(...,lock_workers=True)`` by spawning 30 runs with overlapping
388
400
  and non-overlapping worker sets.
389
401
  """
390
402
  try:
@@ -423,7 +435,9 @@ def test_create_destroy_create():
423
435
  with LocalCluster(n_workers=1) as cluster:
424
436
  with Client(cluster) as client:
425
437
  context = comms.default_comms()
426
- scheduler_addresses_old = list(client.scheduler_info()["workers"].keys())
438
+ scheduler_addresses_old = list(
439
+ client.scheduler_info(n_workers=-1)["workers"].keys()
440
+ )
427
441
  comms_addresses_old = list(comms.default_comms().worker_addresses)
428
442
  assert comms.default_comms() is context
429
443
  assert len(comms._comms_cache) == 1
@@ -444,7 +458,9 @@ def test_create_destroy_create():
444
458
  # because we referenced the old cluster's addresses.
445
459
  with LocalCluster(n_workers=1) as cluster:
446
460
  with Client(cluster) as client:
447
- scheduler_addresses_new = list(client.scheduler_info()["workers"].keys())
461
+ scheduler_addresses_new = list(
462
+ client.scheduler_info(n_workers=-1)["workers"].keys()
463
+ )
448
464
  comms_addresses_new = list(comms.default_comms().worker_addresses)
449
465
 
450
466
  assert scheduler_addresses_new == comms_addresses_new
@@ -485,7 +501,8 @@ def test_scaled_cluster_gets_new_comms_context():
485
501
  "n_workers": 2,
486
502
  }
487
503
  expected_1 = {
488
- k: expected_values for k in client.scheduler_info()["workers"]
504
+ k: expected_values
505
+ for k in client.scheduler_info(n_workers=-1)["workers"]
489
506
  }
490
507
  assert result_1 == expected_1
491
508
 
@@ -513,7 +530,8 @@ def test_scaled_cluster_gets_new_comms_context():
513
530
  "n_workers": 3,
514
531
  }
515
532
  expected_2 = {
516
- k: expected_values for k in client.scheduler_info()["workers"]
533
+ k: expected_values
534
+ for k in client.scheduler_info(n_workers=-1)["workers"]
517
535
  }
518
536
  assert result_2 == expected_2
519
537
 
@@ -1,19 +1,21 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import pytest
2
5
 
3
6
  import dask.array as da
4
7
  from distributed import Client
5
8
 
6
9
  from dask_cuda import LocalCUDACluster
10
+ from dask_cuda.utils_test import get_ucx_implementation
7
11
 
8
12
  cupy = pytest.importorskip("cupy")
9
13
 
10
14
 
11
- @pytest.mark.parametrize("protocol", ["ucx", "ucxx", "tcp"])
15
+ @pytest.mark.parametrize("protocol", ["ucx", "ucx-old", "tcp"])
12
16
  def test_ucx_from_array(protocol):
13
- if protocol == "ucx":
14
- pytest.importorskip("ucp")
15
- elif protocol == "ucxx":
16
- pytest.importorskip("ucxx")
17
+ if protocol.startswith("ucx"):
18
+ get_ucx_implementation(protocol)
17
19
 
18
20
  N = 10_000
19
21
  with LocalCUDACluster(protocol=protocol) as cluster:
@@ -1,3 +1,6 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION & AFFILIATES.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import multiprocessing as mp
2
5
  import sys
3
6
 
@@ -11,7 +14,7 @@ from distributed.deploy.local import LocalCluster
11
14
 
12
15
  from dask_cuda.initialize import initialize
13
16
  from dask_cuda.utils import get_ucx_config
14
- from dask_cuda.utils_test import IncreasedCloseTimeoutNanny
17
+ from dask_cuda.utils_test import IncreasedCloseTimeoutNanny, get_ucx_implementation
15
18
 
16
19
  mp = mp.get_context("spawn") # type: ignore
17
20
 
@@ -22,10 +25,7 @@ mp = mp.get_context("spawn") # type: ignore
22
25
 
23
26
 
24
27
  def _test_initialize_ucx_tcp(protocol):
25
- if protocol == "ucx":
26
- ucp = pytest.importorskip("ucp")
27
- elif protocol == "ucxx":
28
- ucp = pytest.importorskip("ucxx")
28
+ ucp = get_ucx_implementation(protocol)
29
29
 
30
30
  kwargs = {"enable_tcp_over_ucx": True}
31
31
  initialize(protocol=protocol, **kwargs)
@@ -55,12 +55,9 @@ def _test_initialize_ucx_tcp(protocol):
55
55
  assert all(client.run(check_ucx_options).values())
56
56
 
57
57
 
58
- @pytest.mark.parametrize("protocol", ["ucx", "ucxx"])
58
+ @pytest.mark.parametrize("protocol", ["ucx", "ucx-old"])
59
59
  def test_initialize_ucx_tcp(protocol):
60
- if protocol == "ucx":
61
- pytest.importorskip("ucp")
62
- elif protocol == "ucxx":
63
- pytest.importorskip("ucxx")
60
+ get_ucx_implementation(protocol)
64
61
 
65
62
  p = mp.Process(target=_test_initialize_ucx_tcp, args=(protocol,))
66
63
  p.start()
@@ -69,10 +66,7 @@ def test_initialize_ucx_tcp(protocol):
69
66
 
70
67
 
71
68
  def _test_initialize_ucx_nvlink(protocol):
72
- if protocol == "ucx":
73
- ucp = pytest.importorskip("ucp")
74
- elif protocol == "ucxx":
75
- ucp = pytest.importorskip("ucxx")
69
+ ucp = get_ucx_implementation(protocol)
76
70
 
77
71
  kwargs = {"enable_nvlink": True}
78
72
  initialize(protocol=protocol, **kwargs)
@@ -103,12 +97,9 @@ def _test_initialize_ucx_nvlink(protocol):
103
97
  assert all(client.run(check_ucx_options).values())
104
98
 
105
99
 
106
- @pytest.mark.parametrize("protocol", ["ucx", "ucxx"])
100
+ @pytest.mark.parametrize("protocol", ["ucx", "ucx-old"])
107
101
  def test_initialize_ucx_nvlink(protocol):
108
- if protocol == "ucx":
109
- pytest.importorskip("ucp")
110
- elif protocol == "ucxx":
111
- pytest.importorskip("ucxx")
102
+ get_ucx_implementation(protocol)
112
103
 
113
104
  p = mp.Process(target=_test_initialize_ucx_nvlink, args=(protocol,))
114
105
  p.start()
@@ -117,10 +108,7 @@ def test_initialize_ucx_nvlink(protocol):
117
108
 
118
109
 
119
110
  def _test_initialize_ucx_infiniband(protocol):
120
- if protocol == "ucx":
121
- ucp = pytest.importorskip("ucp")
122
- elif protocol == "ucxx":
123
- ucp = pytest.importorskip("ucxx")
111
+ ucp = get_ucx_implementation(protocol)
124
112
 
125
113
  kwargs = {"enable_infiniband": True}
126
114
  initialize(protocol=protocol, **kwargs)
@@ -154,12 +142,9 @@ def _test_initialize_ucx_infiniband(protocol):
154
142
  @pytest.mark.skipif(
155
143
  "ib0" not in psutil.net_if_addrs(), reason="Infiniband interface ib0 not found"
156
144
  )
157
- @pytest.mark.parametrize("protocol", ["ucx", "ucxx"])
145
+ @pytest.mark.parametrize("protocol", ["ucx", "ucx-old"])
158
146
  def test_initialize_ucx_infiniband(protocol):
159
- if protocol == "ucx":
160
- pytest.importorskip("ucp")
161
- elif protocol == "ucxx":
162
- pytest.importorskip("ucxx")
147
+ get_ucx_implementation(protocol)
163
148
 
164
149
  p = mp.Process(target=_test_initialize_ucx_infiniband, args=(protocol,))
165
150
  p.start()
@@ -168,10 +153,7 @@ def test_initialize_ucx_infiniband(protocol):
168
153
 
169
154
 
170
155
  def _test_initialize_ucx_all(protocol):
171
- if protocol == "ucx":
172
- ucp = pytest.importorskip("ucp")
173
- elif protocol == "ucxx":
174
- ucp = pytest.importorskip("ucxx")
156
+ ucp = get_ucx_implementation(protocol)
175
157
 
176
158
  initialize(protocol=protocol)
177
159
  with LocalCluster(
@@ -204,12 +186,9 @@ def _test_initialize_ucx_all(protocol):
204
186
  assert all(client.run(check_ucx_options).values())
205
187
 
206
188
 
207
- @pytest.mark.parametrize("protocol", ["ucx", "ucxx"])
189
+ @pytest.mark.parametrize("protocol", ["ucx", "ucx-old"])
208
190
  def test_initialize_ucx_all(protocol):
209
- if protocol == "ucx":
210
- pytest.importorskip("ucp")
211
- elif protocol == "ucxx":
212
- pytest.importorskip("ucxx")
191
+ get_ucx_implementation(protocol)
213
192
 
214
193
  p = mp.Process(target=_test_initialize_ucx_all, args=(protocol,))
215
194
  p.start()