Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions python/ucxx/ucxx/_compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause

from ucxx._lib.libucxx import get_ucx_version

UCX_LT_1_22_0 = get_ucx_version() < (1, 22, 0)

__all__ = ["UCX_LT_1_22_0"]
13 changes: 13 additions & 0 deletions python/ucxx/ucxx/_lib_async/tests/test_send_recv_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest

import ucxx
from ucxx._compat import UCX_LT_1_22_0
from ucxx._lib_async.utils_test import (
recv_close_receipt,
send_close_receipt,
Expand All @@ -18,6 +19,16 @@
dtypes = ["|u1", "<i8", "f8"]


def skip_nonminimal_gpu_case_on_old_ucx(size, multi_size):
# UCX versions before 1.22 require disabling CUDA IPC in CI to avoid a same-process,
# same-GPU OOM bug (https://github.com/rapidsai/ucxx/issues/733). Without
# CUDA IPC, the larger multi-buffer GPU cases are prohibitively slow and
# can exhaust the test-suite timeout. Keep one minimal case per dtype to
# retain coverage of both GPU array implementations.
if UCX_LT_1_22_0 and (size != min(msg_sizes) or multi_size != min(multi_sizes)):
pytest.skip("UCX < 1.22 is prohibitively slow for nonminimal GPU cases")


def make_echo_server():
"""
Returns an echo server that calls the function `create_empty_data(nbytes)`
Expand Down Expand Up @@ -76,6 +87,7 @@ async def test_send_recv_numpy(size, multi_size, dtype):
@pytest.mark.parametrize("dtype", dtypes)
@pytest.mark.flaky(reruns=3)
async def test_send_recv_cupy(size, multi_size, dtype):
skip_nonminimal_gpu_case_on_old_ucx(size, multi_size)
cupy = pytest.importorskip("cupy")

send_msg = [cupy.arange(size, dtype=dtype)] * multi_size
Expand All @@ -96,6 +108,7 @@ async def test_send_recv_cupy(size, multi_size, dtype):
@pytest.mark.parametrize("dtype", dtypes)
@pytest.mark.flaky(reruns=3)
async def test_send_recv_numba(size, multi_size, dtype):
skip_nonminimal_gpu_case_on_old_ucx(size, multi_size)
cuda = pytest.importorskip("numba.cuda")

ary = np.arange(size, dtype=dtype)
Expand Down
Loading