Skip to content

Commit 7a8e4da

Browse files
committed
UCT: Merge branch 'master' into uct-perftest-device-cuda
2 parents 20f5399 + c84ccde commit 7a8e4da

File tree

6 files changed

+56
-2
lines changed

6 files changed

+56
-2
lines changed

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ dist_perftest__DATA = \
3434
contrib/ucx_perftest_config/test_types_ucp_rma \
3535
contrib/ucx_perftest_config/test_types_ucp_amo \
3636
contrib/ucx_perftest_config/test_types_ucp_daemon \
37+
contrib/ucx_perftest_config/test_types_ucp_device_cuda \
3738
contrib/ucx_perftest_config/transports
3839

3940
SUBDIRS = \

buildlib/az-helpers.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,16 @@ function az_module_unload() {
140140
module unload "${module}" || true
141141
}
142142

143+
get_num_gpus() {
144+
num_gpus=$(nvidia-smi -L | grep GPU | wc -l)
145+
echo "$num_gpus"
146+
}
147+
143148
# Ensure that GPU is present
144149
check_gpu() {
145150
name=$1
146151
if [ "$name" == "gpu" ]; then
147-
if ! nvidia-smi -L |& grep -q GPU; then
152+
if [ "$(get_num_gpus)" -eq 0 ]; then
148153
azure_log_error "No GPU device found on $(hostname -s)"
149154
exit 1
150155
fi
@@ -185,7 +190,7 @@ try_load_cuda_env() {
185190

186191
# Check number of available GPUs
187192
nvidia-smi -a || true
188-
num_gpus=$(nvidia-smi -L | grep GPU | wc -l)
193+
num_gpus=$(get_num_gpus)
189194
[ "${num_gpus}" -gt 0 ] || return 0
190195

191196
# Check cuda env module

buildlib/tools/common.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ make_clean() {
7070
$MAKEP ${1:-clean}
7171
}
7272

73+
has_gpunetio_devel() {
74+
[ -d "/opt/mellanox/doca" ]
75+
}
76+
7377
#
7478
# Configure and build
7579
# $1 - mode (devel|release)
@@ -82,6 +86,11 @@ build() {
8286
if [ "X$have_cuda" == "Xyes" ]
8387
then
8488
config_args+=" --with-iodemo-cuda"
89+
90+
if has_gpunetio_devel
91+
then
92+
config_args+=" --with-doca-gpunetio=/opt/mellanox/doca"
93+
fi
8594
fi
8695

8796
../contrib/configure-${mode} ${config_args} "$@"

contrib/test_jenkins.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,36 @@ run_ucx_perftest_with_daemon() {
633633
done
634634
}
635635

636+
#
637+
# Run UCX performance cuda device test
638+
#
639+
run_ucx_perftest_cuda_device() {
640+
if [ "X$have_cuda" != "Xyes" ]; then
641+
echo "==== CUDA not available, skipping CUDA device tests ===="
642+
return 0
643+
fi
644+
645+
if ! has_gpunetio_devel; then
646+
echo "==== DOCA not available, skipping CUDA device tests ===="
647+
return 0
648+
fi
649+
650+
if [ "$(get_num_gpus)" -eq 0 ]; then
651+
echo "==== No NVIDIA GPUs found, skipping CUDA device tests ===="
652+
return 0
653+
fi
654+
655+
echo "==== Running ucx_perftest with cuda kernel ===="
656+
ucx_inst_ptest=$ucx_inst/share/ucx/perftest
657+
ucx_perftest="$ucx_inst/bin/ucx_perftest"
658+
ucp_test_args="-b $ucx_inst_ptest/test_types_ucp_device_cuda"
659+
660+
# TODO: Run on all GPUs
661+
ucp_client_args="-a cuda $(hostname)"
662+
663+
run_client_server_app "$ucx_perftest" "$ucp_test_args" "$ucp_client_args" 0 0
664+
}
665+
636666
#
637667
# Test malloc hooks with mpi
638668
#
@@ -1208,6 +1238,7 @@ run_tests() {
12081238
do_distributed_task 3 4 run_ucp_client_server
12091239
do_distributed_task 0 4 test_no_cuda_context
12101240
do_distributed_task 1 4 run_ucx_perftest_with_daemon
1241+
do_distributed_task 1 4 run_ucx_perftest_cuda_device
12111242

12121243
# long devel tests
12131244
do_distributed_task 0 4 run_ucp_hello
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# UCP basic device cuda tests
3+
#
4+
ucp_device_cuda_bw_1k_1thread -t ucp_put_multi_bw -m cuda -s 1024 -n 10000
5+
ucp_device_cuda_bw_1k_128threads -t ucp_put_multi_bw -m cuda -s 1024 -n 10000 -T 128
6+
ucp_device_cuda_lat_1k_1thread -t ucp_put_multi_lat -m cuda -s 1024 -n 10000
7+
ucp_device_cuda_lat_1k_128threads -t ucp_put_multi_lat -m cuda -s 1024 -n 10000 -T 128

src/tools/perf/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ dist_perftest_DATA = \
4343
$(top_srcdir)/contrib/ucx_perftest_config/test_types_uct \
4444
$(top_srcdir)/contrib/ucx_perftest_config/test_types_ucp \
4545
$(top_srcdir)/contrib/ucx_perftest_config/test_types_ucp_daemon \
46+
$(top_srcdir)/contrib/ucx_perftest_config/test_types_ucp_device_cuda \
4647
$(top_srcdir)/contrib/ucx_perftest_config/transports
4748

4849

0 commit comments

Comments
 (0)