Skip to content

Commit 6d31108

Browse files
Merge pull request #11 from TomAugspurger/tom/dask-cuda
Added dask-cuda
2 parents 1e82663 + bafd088 commit 6d31108

File tree

3 files changed

+115
-24
lines changed

3 files changed

+115
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dask
22
distributed
33
cudf
4+
dask-cuda

scripts/run.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,36 @@ pip install --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/
1919
"cudf-${RAPIDS_PY_CUDA_SUFFIX}" \
2020
"dask-cudf-${RAPIDS_PY_CUDA_SUFFIX}" \
2121
"ucx-py-${RAPIDS_PY_CUDA_SUFFIX}" \
22+
"ucxx-${RAPIDS_PY_CUDA_SUFFIX}" \
2223
"scipy" \
2324
"dask-cuda"
2425

2526

26-
# Clone cudf repo (need dask_cudf tests)
27+
# Clone cudf repo for tests
2728
CUDF_VERSION="branch-25.04"
28-
echo "Cloning cudf@{$CUDF_VERSION}"
2929

3030
if [ ! -d "cudf" ]; then
31+
echo "Cloning cudf@{$CUDF_VERSION}"
3132
git clone https://github.com/rapidsai/cudf.git --branch $CUDF_VERSION
3233
fi
3334

34-
echo "Installing dask@{$DASK_VERSION}"
35+
# Clone dask-cuda for tests
36+
37+
if [ ! -d "dask-cuda" ]; then
38+
echo "Cloning cudf@{$CUDF_VERSION}"
39+
git clone https://github.com/rapidsai/dask-cuda.git --branch $CUDF_VERSION
40+
fi
41+
3542

3643
# depth needs to be sufficient to reach the last tag, so that the package
3744
# versions are set correctly
3845
if [ ! -d "dask" ]; then
46+
echo "Cloning dask@{$DASK_VERSION}"
3947
git clone https://github.com/dask/dask --depth 100 --branch $DASK_VERSION
4048
fi
4149

4250
if [ ! -d "distributed" ]; then
51+
echo "Cloning dask@{$DASK_VERSION}"
4352
git clone https://github.com/dask/distributed --depth 100 --branch $DASK_VERSION
4453
fi
4554

scripts/test.sh

Lines changed: 102 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,106 @@
11
#!/usr/bin/env bash
22
# SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES.
33

4-
echo "[testing dask-cudf]"
5-
pushd cudf/python/dask_cudf || exit 1
6-
pytest dask_cudf -v
7-
dask_cudf_status=$?
8-
popd || exit 1
9-
10-
echo "[testing dask]"
11-
pushd dask || exit 1
12-
pytest dask -v -m gpu
13-
dask_status=$?
14-
popd || exit 1
15-
16-
echo "[testing distributed]"
17-
pushd distributed || exit 1
18-
pytest distributed -v -m gpu --runslow
19-
distributed_status=$?
20-
popd || exit 1
21-
22-
if [ $dask_cudf_status -ne 0 ] || [ $dask_status -ne 0 ] || [ $distributed_status -ne 0 ]; then
23-
echo "Tests faild"
24-
exit 1
4+
if [ $# -eq 0 ]; then
5+
run_dask=true
6+
run_dask_cuda=true
7+
run_dask_cudf=true
8+
run_distributed=true
9+
else
10+
run_dask=false
11+
run_dask_cuda=false
12+
run_dask_cudf=false
13+
run_distributed=false
2514
fi
15+
16+
# Parse command-line arguments
17+
while [[ $# -gt 0 ]]; do
18+
case "$1" in
19+
--dask-only)
20+
run_dask=true
21+
;;
22+
--dask-cuda-only)
23+
run_dask_cuda=true
24+
;;
25+
--dask-cudf-only)
26+
run_dask_cudf=true
27+
;;
28+
--distributed-only)
29+
run_distributed=true
30+
;;
31+
--help)
32+
echo "Usage: $0 [--dask-only] [--distributed-only] [--dask-cuda-only] [--dask-cudf-only]"
33+
exit 0
34+
;;
35+
*)
36+
echo "Unknown option: $1"
37+
exit 1
38+
;;
39+
esac
40+
shift
41+
done
42+
43+
exit_code=0;
44+
45+
# --- dask-cudf ---
46+
if $run_dask_cudf; then
47+
48+
echo "[testing dask-cudf]"
49+
pushd cudf/python/dask_cudf || exit 1
50+
pytest -v dask_cudf
51+
52+
if [[ $? -ne 0 ]]; then
53+
exit_code=1
54+
fi
55+
56+
popd || exit 1
57+
58+
fi
59+
60+
# --- dask-cuda ---
61+
62+
if $run_dask_cuda; then
63+
echo "[testing dask-cuda]"
64+
pushd dask-cuda/dask_cuda/tests || exit 1
65+
pytest -v .
66+
67+
if [[ $? -ne 0 ]]; then
68+
exit_code=1
69+
fi
70+
71+
popd || exit 1
72+
fi
73+
74+
# --- dask ---
75+
76+
if $run_dask; then
77+
78+
echo "[testing dask]"
79+
pushd dask || exit 1
80+
pytest -v -m gpu dask
81+
82+
if [[ $? -ne 0 ]]; then
83+
exit_code=1
84+
fi
85+
86+
popd || exit 1
87+
88+
fi
89+
90+
# --- dask ---
91+
92+
if $run_distributed; then
93+
94+
echo "[testing distributed]"
95+
pushd distributed || exit 1
96+
pytest -v -m gpu --runslow distributed
97+
98+
if [[ $? -ne 0 ]]; then
99+
exit_code=1
100+
fi
101+
102+
popd || exit 1
103+
104+
fi
105+
106+
exit $exit_code

0 commit comments

Comments
 (0)