dask-cuda 24.2.0a18__tar.gz → 24.4.0__tar.gz

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 (61) hide show
  1. {dask-cuda-24.2.0a18/dask_cuda.egg-info → dask_cuda-24.4.0}/PKG-INFO +19 -18
  2. dask_cuda-24.4.0/pyproject.toml +10 -0
  3. dask-cuda-24.2.0a18/LICENSE +0 -201
  4. dask-cuda-24.2.0a18/MANIFEST.in +0 -2
  5. dask-cuda-24.2.0a18/PKG-INFO +0 -72
  6. dask-cuda-24.2.0a18/README.md +0 -33
  7. dask-cuda-24.2.0a18/dask_cuda/VERSION +0 -1
  8. dask-cuda-24.2.0a18/dask_cuda/__init__.py +0 -39
  9. dask-cuda-24.2.0a18/dask_cuda/_version.py +0 -20
  10. dask-cuda-24.2.0a18/dask_cuda/benchmarks/__init__.py +0 -0
  11. dask-cuda-24.2.0a18/dask_cuda/benchmarks/common.py +0 -202
  12. dask-cuda-24.2.0a18/dask_cuda/benchmarks/local_cudf_groupby.py +0 -291
  13. dask-cuda-24.2.0a18/dask_cuda/benchmarks/local_cudf_merge.py +0 -378
  14. dask-cuda-24.2.0a18/dask_cuda/benchmarks/local_cudf_shuffle.py +0 -269
  15. dask-cuda-24.2.0a18/dask_cuda/benchmarks/local_cupy.py +0 -338
  16. dask-cuda-24.2.0a18/dask_cuda/benchmarks/local_cupy_map_overlap.py +0 -209
  17. dask-cuda-24.2.0a18/dask_cuda/benchmarks/utils.py +0 -825
  18. dask-cuda-24.2.0a18/dask_cuda/cli.py +0 -506
  19. dask-cuda-24.2.0a18/dask_cuda/cuda_worker.py +0 -248
  20. dask-cuda-24.2.0a18/dask_cuda/device_host_file.py +0 -309
  21. dask-cuda-24.2.0a18/dask_cuda/disk_io.py +0 -224
  22. dask-cuda-24.2.0a18/dask_cuda/explicit_comms/__init__.py +0 -0
  23. dask-cuda-24.2.0a18/dask_cuda/explicit_comms/comms.py +0 -327
  24. dask-cuda-24.2.0a18/dask_cuda/explicit_comms/dataframe/__init__.py +0 -0
  25. dask-cuda-24.2.0a18/dask_cuda/explicit_comms/dataframe/shuffle.py +0 -599
  26. dask-cuda-24.2.0a18/dask_cuda/get_device_memory_objects.py +0 -138
  27. dask-cuda-24.2.0a18/dask_cuda/initialize.py +0 -190
  28. dask-cuda-24.2.0a18/dask_cuda/is_device_object.py +0 -40
  29. dask-cuda-24.2.0a18/dask_cuda/is_spillable_object.py +0 -55
  30. dask-cuda-24.2.0a18/dask_cuda/local_cuda_cluster.py +0 -417
  31. dask-cuda-24.2.0a18/dask_cuda/plugins.py +0 -122
  32. dask-cuda-24.2.0a18/dask_cuda/proxify_device_objects.py +0 -258
  33. dask-cuda-24.2.0a18/dask_cuda/proxify_host_file.py +0 -792
  34. dask-cuda-24.2.0a18/dask_cuda/proxy_object.py +0 -936
  35. dask-cuda-24.2.0a18/dask_cuda/tests/test_cudf_builtin_spilling.py +0 -153
  36. dask-cuda-24.2.0a18/dask_cuda/tests/test_dask_cuda_worker.py +0 -511
  37. dask-cuda-24.2.0a18/dask_cuda/tests/test_device_host_file.py +0 -201
  38. dask-cuda-24.2.0a18/dask_cuda/tests/test_dgx.py +0 -239
  39. dask-cuda-24.2.0a18/dask_cuda/tests/test_explicit_comms.py +0 -353
  40. dask-cuda-24.2.0a18/dask_cuda/tests/test_from_array.py +0 -22
  41. dask-cuda-24.2.0a18/dask_cuda/tests/test_gds.py +0 -44
  42. dask-cuda-24.2.0a18/dask_cuda/tests/test_initialize.py +0 -216
  43. dask-cuda-24.2.0a18/dask_cuda/tests/test_local_cuda_cluster.py +0 -534
  44. dask-cuda-24.2.0a18/dask_cuda/tests/test_proxify_host_file.py +0 -489
  45. dask-cuda-24.2.0a18/dask_cuda/tests/test_proxy.py +0 -696
  46. dask-cuda-24.2.0a18/dask_cuda/tests/test_spill.py +0 -326
  47. dask-cuda-24.2.0a18/dask_cuda/tests/test_utils.py +0 -278
  48. dask-cuda-24.2.0a18/dask_cuda/tests/test_worker_spec.py +0 -77
  49. dask-cuda-24.2.0a18/dask_cuda/utils.py +0 -766
  50. dask-cuda-24.2.0a18/dask_cuda/utils_test.py +0 -45
  51. dask-cuda-24.2.0a18/dask_cuda/worker_spec.py +0 -126
  52. dask-cuda-24.2.0a18/dask_cuda.egg-info/SOURCES.txt +0 -58
  53. dask-cuda-24.2.0a18/dask_cuda.egg-info/dependency_links.txt +0 -1
  54. dask-cuda-24.2.0a18/dask_cuda.egg-info/entry_points.txt +0 -6
  55. dask-cuda-24.2.0a18/dask_cuda.egg-info/requires.txt +0 -21
  56. dask-cuda-24.2.0a18/dask_cuda.egg-info/top_level.txt +0 -5
  57. dask-cuda-24.2.0a18/examples/ucx/client_initialize.py +0 -59
  58. dask-cuda-24.2.0a18/examples/ucx/local_cuda_cluster.py +0 -78
  59. dask-cuda-24.2.0a18/pyproject.toml +0 -140
  60. dask-cuda-24.2.0a18/setup.cfg +0 -4
  61. dask-cuda-24.2.0a18/setup.py +0 -3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dask-cuda
3
- Version: 24.2.0a18
3
+ Version: 24.4.0
4
4
  Summary: Utilities for Dask and CUDA interactions
5
5
  Author: NVIDIA Corporation
6
6
  License: Apache-2.0
@@ -14,28 +14,29 @@ Classifier: License :: OSI Approved :: Apache Software License
14
14
  Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
17
18
  Requires-Python: >=3.9
18
19
  Description-Content-Type: text/markdown
19
20
  License-File: LICENSE
20
- Requires-Dist: click>=8.1
21
- Requires-Dist: numba>=0.57
22
- Requires-Dist: numpy>=1.21
23
- Requires-Dist: pandas<1.6.0.dev0,>=1.3
24
- Requires-Dist: pynvml<11.5,>=11.0.0
25
- Requires-Dist: rapids-dask-dependency==24.2.*,>=0.0.0a0
26
- Requires-Dist: zict>=2.0.0
21
+ Requires-Dist: click >=8.1
22
+ Requires-Dist: numba >=0.57
23
+ Requires-Dist: numpy <2.0a0,>=1.23
24
+ Requires-Dist: pandas >=1.3
25
+ Requires-Dist: pynvml <11.5,>=11.0.0
26
+ Requires-Dist: rapids-dask-dependency ==24.4.*
27
+ Requires-Dist: zict >=2.0.0
27
28
  Provides-Extra: docs
28
- Requires-Dist: numpydoc>=1.1.0; extra == "docs"
29
- Requires-Dist: sphinx; extra == "docs"
30
- Requires-Dist: sphinx-click>=2.7.1; extra == "docs"
31
- Requires-Dist: sphinx-rtd-theme>=0.5.1; extra == "docs"
29
+ Requires-Dist: numpydoc >=1.1.0 ; extra == 'docs'
30
+ Requires-Dist: sphinx ; extra == 'docs'
31
+ Requires-Dist: sphinx-click >=2.7.1 ; extra == 'docs'
32
+ Requires-Dist: sphinx-rtd-theme >=0.5.1 ; extra == 'docs'
32
33
  Provides-Extra: test
33
- Requires-Dist: cudf==24.2.*; extra == "test"
34
- Requires-Dist: dask-cudf==24.2.*; extra == "test"
35
- Requires-Dist: kvikio==24.2.*; extra == "test"
36
- Requires-Dist: pytest; extra == "test"
37
- Requires-Dist: pytest-cov; extra == "test"
38
- Requires-Dist: ucx-py==0.36.*; extra == "test"
34
+ Requires-Dist: cudf ==24.4.* ; extra == 'test'
35
+ Requires-Dist: dask-cudf ==24.4.* ; extra == 'test'
36
+ Requires-Dist: kvikio ==24.4.* ; extra == 'test'
37
+ Requires-Dist: pytest ; extra == 'test'
38
+ Requires-Dist: pytest-cov ; extra == 'test'
39
+ Requires-Dist: ucx-py ==0.37.* ; extra == 'test'
39
40
 
40
41
  Dask CUDA
41
42
  =========
@@ -0,0 +1,10 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2
3
+
4
+ [build-system]
5
+ requires = ["wheel-stub"]
6
+ build-backend = "wheel_stub.buildapi"
7
+
8
+ [tool.wheel_stub]
9
+ index_url = "https://pypi.nvidia.com/"
10
+ include_cuda_debuginfo = true
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "{}"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2019 NVIDIA Corporation
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
@@ -1,2 +0,0 @@
1
- include dask_cuda/_version.py
2
- include dask_cuda/VERSION
@@ -1,72 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: dask-cuda
3
- Version: 24.2.0a18
4
- Summary: Utilities for Dask and CUDA interactions
5
- Author: NVIDIA Corporation
6
- License: Apache-2.0
7
- Project-URL: Homepage, https://github.com/rapidsai/dask-cuda
8
- Project-URL: Documentation, https://docs.rapids.ai/api/dask-cuda/stable/
9
- Project-URL: Source, https://github.com/rapidsai/dask-cuda
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Topic :: Database
12
- Classifier: Topic :: Scientific/Engineering
13
- Classifier: License :: OSI Approved :: Apache Software License
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Requires-Dist: click>=8.1
21
- Requires-Dist: numba>=0.57
22
- Requires-Dist: numpy>=1.21
23
- Requires-Dist: pandas<1.6.0.dev0,>=1.3
24
- Requires-Dist: pynvml<11.5,>=11.0.0
25
- Requires-Dist: rapids-dask-dependency==24.2.*,>=0.0.0a0
26
- Requires-Dist: zict>=2.0.0
27
- Provides-Extra: docs
28
- Requires-Dist: numpydoc>=1.1.0; extra == "docs"
29
- Requires-Dist: sphinx; extra == "docs"
30
- Requires-Dist: sphinx-click>=2.7.1; extra == "docs"
31
- Requires-Dist: sphinx-rtd-theme>=0.5.1; extra == "docs"
32
- Provides-Extra: test
33
- Requires-Dist: cudf==24.2.*; extra == "test"
34
- Requires-Dist: dask-cudf==24.2.*; extra == "test"
35
- Requires-Dist: kvikio==24.2.*; extra == "test"
36
- Requires-Dist: pytest; extra == "test"
37
- Requires-Dist: pytest-cov; extra == "test"
38
- Requires-Dist: ucx-py==0.36.*; extra == "test"
39
-
40
- Dask CUDA
41
- =========
42
-
43
- Various utilities to improve deployment and management of Dask workers on
44
- CUDA-enabled systems.
45
-
46
- This library is experimental, and its API is subject to change at any time
47
- without notice.
48
-
49
- Example
50
- -------
51
-
52
- ```python
53
- from dask_cuda import LocalCUDACluster
54
- from dask.distributed import Client
55
-
56
- cluster = LocalCUDACluster()
57
- client = Client(cluster)
58
- ```
59
-
60
- Documentation is available [here](https://docs.rapids.ai/api/dask-cuda/nightly/).
61
-
62
- What this is not
63
- ----------------
64
-
65
- This library does not automatically convert your Dask code to run on GPUs.
66
-
67
- It only helps with deployment and management of Dask workers in multi-GPU
68
- systems. Parallelizing GPU libraries like [RAPIDS](https://rapids.ai) and
69
- [CuPy](https://cupy.chainer.org) with Dask is an ongoing effort. You may wish
70
- to read about this effort at [blog.dask.org](https://blog.dask.org) for more
71
- information. Additional information about Dask-CUDA can also be found in the
72
- [docs](https://docs.rapids.ai/api/dask-cuda/nightly/).
@@ -1,33 +0,0 @@
1
- Dask CUDA
2
- =========
3
-
4
- Various utilities to improve deployment and management of Dask workers on
5
- CUDA-enabled systems.
6
-
7
- This library is experimental, and its API is subject to change at any time
8
- without notice.
9
-
10
- Example
11
- -------
12
-
13
- ```python
14
- from dask_cuda import LocalCUDACluster
15
- from dask.distributed import Client
16
-
17
- cluster = LocalCUDACluster()
18
- client = Client(cluster)
19
- ```
20
-
21
- Documentation is available [here](https://docs.rapids.ai/api/dask-cuda/nightly/).
22
-
23
- What this is not
24
- ----------------
25
-
26
- This library does not automatically convert your Dask code to run on GPUs.
27
-
28
- It only helps with deployment and management of Dask workers in multi-GPU
29
- systems. Parallelizing GPU libraries like [RAPIDS](https://rapids.ai) and
30
- [CuPy](https://cupy.chainer.org) with Dask is an ongoing effort. You may wish
31
- to read about this effort at [blog.dask.org](https://blog.dask.org) for more
32
- information. Additional information about Dask-CUDA can also be found in the
33
- [docs](https://docs.rapids.ai/api/dask-cuda/nightly/).
@@ -1 +0,0 @@
1
- 24.02.00a18
@@ -1,39 +0,0 @@
1
- import sys
2
-
3
- if sys.platform != "linux":
4
- raise ImportError("Only Linux is supported by Dask-CUDA at this time")
5
-
6
-
7
- import dask
8
- import dask.utils
9
- import dask.dataframe.core
10
- import dask.dataframe.shuffle
11
- import dask.dataframe.multi
12
- import dask.bag.core
13
-
14
- from ._version import __git_commit__, __version__
15
- from .cuda_worker import CUDAWorker
16
- from .explicit_comms.dataframe.shuffle import (
17
- get_rearrange_by_column_wrapper,
18
- get_default_shuffle_method,
19
- )
20
- from .local_cuda_cluster import LocalCUDACluster
21
- from .proxify_device_objects import proxify_decorator, unproxify_decorator
22
-
23
-
24
- # Monkey patching Dask to make use of explicit-comms when `DASK_EXPLICIT_COMMS=True`
25
- dask.dataframe.shuffle.rearrange_by_column = get_rearrange_by_column_wrapper(
26
- dask.dataframe.shuffle.rearrange_by_column
27
- )
28
- # We have to replace all modules that imports Dask's `get_default_shuffle_method()`
29
- # TODO: introduce a shuffle-algorithm dispatcher in Dask so we don't need this hack
30
- dask.dataframe.shuffle.get_default_shuffle_method = get_default_shuffle_method
31
- dask.dataframe.multi.get_default_shuffle_method = get_default_shuffle_method
32
- dask.bag.core.get_default_shuffle_method = get_default_shuffle_method
33
-
34
-
35
- # Monkey patching Dask to make use of proxify and unproxify in compatibility mode
36
- dask.dataframe.shuffle.shuffle_group = proxify_decorator(
37
- dask.dataframe.shuffle.shuffle_group
38
- )
39
- dask.dataframe.core._concat = unproxify_decorator(dask.dataframe.core._concat)
@@ -1,20 +0,0 @@
1
- # Copyright (c) 2023, NVIDIA CORPORATION.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- import importlib.resources
16
-
17
- __version__ = (
18
- importlib.resources.files("dask_cuda").joinpath("VERSION").read_text().strip()
19
- )
20
- __git_commit__ = "94b858b91f541b18b924d8ed1c5b78b3d9634552"
File without changes
@@ -1,202 +0,0 @@
1
- from argparse import Namespace
2
- from functools import partial
3
- from typing import Any, Callable, List, Mapping, NamedTuple, Optional, Tuple
4
- from warnings import filterwarnings
5
-
6
- import numpy as np
7
- import pandas as pd
8
-
9
- import dask
10
- from distributed import Client
11
-
12
- from dask_cuda.benchmarks.utils import (
13
- address_to_index,
14
- aggregate_transfer_log_data,
15
- bandwidth_statistics,
16
- get_cluster_options,
17
- peer_to_peer_bandwidths,
18
- save_benchmark_data,
19
- setup_memory_pools,
20
- wait_for_cluster,
21
- )
22
- from dask_cuda.utils import all_to_all
23
-
24
- __all__ = ("execute_benchmark", "Config")
25
-
26
-
27
- class Config(NamedTuple):
28
- """Benchmark configuration"""
29
-
30
- args: Namespace
31
- """Parsed benchmark arguments"""
32
- bench_once: Callable[[Client, Namespace, Optional[str]], Any]
33
- """Callable to run a single benchmark iteration
34
-
35
- Parameters
36
- ----------
37
- client
38
- distributed Client object
39
- args
40
- Benchmark parsed arguments
41
- write_profile
42
- Should a profile be written?
43
-
44
- Returns
45
- -------
46
- Benchmark data to be interpreted by ``pretty_print_results`` and
47
- ``create_tidy_results``.
48
- """
49
- create_tidy_results: Callable[
50
- [Namespace, np.ndarray, List[Any]], Tuple[pd.DataFrame, np.ndarray]
51
- ]
52
- """Callable to create tidy results for saving to disk
53
-
54
- Parameters
55
- ----------
56
- args
57
- Benchmark parsed arguments
58
- p2p_bw
59
- Array of point-to-point bandwidths
60
- results: list
61
- List of results from running ``bench_once``
62
- Returns
63
- -------
64
- tuple
65
- two-tuple of a pandas dataframe and the point-to-point bandwidths
66
- """
67
- pretty_print_results: Callable[
68
- [Namespace, Mapping[str, int], np.ndarray, List[Any]], None
69
- ]
70
- """Callable to pretty-print results for human consumption
71
-
72
- Parameters
73
- ----------
74
- args
75
- Benchmark parsed arguments
76
- address_to_index
77
- Mapping from worker addresses to indices
78
- p2p_bw
79
- Array of point-to-point bandwidths
80
- results: list
81
- List of results from running ``bench_once``
82
- """
83
-
84
-
85
- def run_benchmark(client: Client, args: Namespace, config: Config):
86
- """Run a benchmark a specified number of times
87
-
88
- If ``args.profile`` is set, the final run is profiled.
89
- """
90
- results = []
91
- for _ in range(max(1, args.runs) - 1):
92
- res = config.bench_once(client, args, write_profile=None)
93
- results.append(res)
94
- results.append(config.bench_once(client, args, write_profile=args.profile))
95
- return results
96
-
97
-
98
- def gather_bench_results(client: Client, args: Namespace, config: Config):
99
- """Collect benchmark results from the workers"""
100
- address2index = address_to_index(client)
101
- if args.all_to_all:
102
- all_to_all(client)
103
- results = run_benchmark(client, args, config)
104
- # Collect aggregated peer-to-peer bandwidth
105
- message_data = client.run(
106
- partial(aggregate_transfer_log_data, bandwidth_statistics, args.ignore_size)
107
- )
108
- return address2index, results, message_data
109
-
110
-
111
- def run(client: Client, args: Namespace, config: Config):
112
- """Run the full benchmark on the cluster
113
-
114
- Waits for the cluster, sets up memory pools, prints and saves results
115
- """
116
-
117
- wait_for_cluster(client, shutdown_on_failure=True)
118
- assert len(client.scheduler_info()["workers"]) > 0
119
- setup_memory_pools(
120
- client,
121
- args.type == "gpu",
122
- args.rmm_pool_size,
123
- args.disable_rmm_pool,
124
- args.enable_rmm_async,
125
- args.enable_rmm_managed,
126
- args.rmm_release_threshold,
127
- args.rmm_log_directory,
128
- args.enable_rmm_statistics,
129
- args.enable_rmm_track_allocations,
130
- )
131
- address_to_index, results, message_data = gather_bench_results(client, args, config)
132
- p2p_bw = peer_to_peer_bandwidths(message_data, address_to_index)
133
- config.pretty_print_results(args, address_to_index, p2p_bw, results)
134
- if args.output_basename:
135
- df, p2p_bw = config.create_tidy_results(args, p2p_bw, results)
136
- df["num_workers"] = len(address_to_index)
137
- save_benchmark_data(
138
- args.output_basename,
139
- address_to_index,
140
- df,
141
- p2p_bw,
142
- )
143
-
144
-
145
- def run_client_from_existing_scheduler(args: Namespace, config: Config):
146
- """Set up a client by connecting to a scheduler
147
-
148
- Shuts down the cluster at the end of the benchmark conditional on
149
- ``args.shutdown_cluster``.
150
- """
151
- if args.scheduler_address is not None:
152
- kwargs = {"address": args.scheduler_address}
153
- elif args.scheduler_file is not None:
154
- kwargs = {"scheduler_file": args.scheduler_file}
155
- else:
156
- raise RuntimeError(
157
- "Need to specify either --scheduler-file " "or --scheduler-address"
158
- )
159
- with Client(**kwargs) as client:
160
- run(client, args, config)
161
- if args.shutdown_cluster:
162
- client.shutdown()
163
-
164
-
165
- def run_create_client(args: Namespace, config: Config):
166
- """Create a client + cluster and run
167
-
168
- Shuts down the cluster at the end of the benchmark
169
- """
170
- cluster_options = get_cluster_options(args)
171
- Cluster = cluster_options["class"]
172
- cluster_args = cluster_options["args"]
173
- cluster_kwargs = cluster_options["kwargs"]
174
- scheduler_addr = cluster_options["scheduler_addr"]
175
-
176
- filterwarnings("ignore", message=".*NVLink.*rmm_pool_size.*", category=UserWarning)
177
-
178
- with Cluster(*cluster_args, **cluster_kwargs) as cluster:
179
- # Use the scheduler address with an SSHCluster rather than the cluster
180
- # object, otherwise we can't shut it down.
181
- with Client(scheduler_addr if args.multi_node else cluster) as client:
182
- run(client, args, config)
183
- # An SSHCluster will not automatically shut down, we have to
184
- # ensure it does.
185
- if args.multi_node:
186
- client.shutdown()
187
-
188
-
189
- def execute_benchmark(config: Config):
190
- """Run complete benchmark given a configuration"""
191
- args = config.args
192
- if args.multiprocessing_method == "forkserver":
193
- import multiprocessing.forkserver as f
194
-
195
- f.ensure_running()
196
- with dask.config.set(
197
- {"distributed.worker.multiprocessing-method": args.multiprocessing_method}
198
- ):
199
- if args.scheduler_file is not None or args.scheduler_address is not None:
200
- run_client_from_existing_scheduler(args, config)
201
- else:
202
- run_create_client(args, config)