Skip to content

Cuda parallel test add mark large #4723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
2 changes: 1 addition & 1 deletion ci/test_cuda_parallel_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ python -m pip install "${CUDA_PARALLEL_WHEEL_PATH}[test]"

# Run tests
cd "/home/coder/cccl/python/cuda_parallel/tests/"
python -m pytest -n auto -v
python -m pytest -n 6 -v -m "not large"
5 changes: 4 additions & 1 deletion python/cuda_parallel/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,7 @@ extend = "../../pyproject.toml"
known-first-party = ["cuda.parallel"]

[tool.pytest.ini_options]
markers = ["no_verify_sass: skip SASS verification check"]
markers = [
"no_verify_sass: skip SASS verification check",
"large: tests requiring large device memory allocations",
]
15 changes: 13 additions & 2 deletions python/cuda_parallel/tests/test_radix_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@

import cuda.parallel.experimental.algorithms as algorithms


def get_mark(dt, log_size):
if log_size < 20:
return tuple()
return pytest.mark.large


DTYPE_LIST = [
np.uint8,
np.uint16,
Expand All @@ -27,7 +34,11 @@

PROBLEM_SIZES = [2, 10, 20]

DTYPE_SIZE = [(dt, 2**log_size) for dt in DTYPE_LIST for log_size in PROBLEM_SIZES]
DTYPE_SIZE = [
pytest.param(dt, 2**log_size, marks=get_mark(dt, log_size))
for dt in DTYPE_LIST
for log_size in PROBLEM_SIZES
]


def random_array(size, dtype, max_value=None) -> np.typing.NDArray:
Expand Down Expand Up @@ -251,7 +262,7 @@ def test_radix_sort_pairs_double_buffer(dtype, num_items):

# These tests take longer to execute so we reduce the number of test cases
DTYPE_SIZE_BIT_WINDOW = [
(dt, 2**log_size)
pytest.param(dt, 2**log_size, marks=get_mark(dt, log_size))
for dt in [np.uint8, np.int16, np.uint32, np.int64, np.float64]
for log_size in [2, 24]
]
Expand Down
8 changes: 7 additions & 1 deletion python/cuda_parallel/tests/test_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ def type_to_problem_sizes(dtype):
raise ValueError("Unsupported dtype")


def get_mark(dt, log_size):
if log_size + np.log2(np.dtype(dt).itemsize) < 21:
return tuple()
return pytest.mark.large


dtype_size_pairs = [
(dt, 2**log_size)
pytest.param(dt, 2**log_size, marks=get_mark(dt, log_size))
for dt in [np.uint8, np.uint16, np.uint32, np.uint64]
for log_size in type_to_problem_sizes(dt)
]
Expand Down
11 changes: 10 additions & 1 deletion python/cuda_parallel/tests/test_unique_by_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,19 @@
np.float64,
]


def get_mark(dt, log_size):
if log_size < 20:
return tuple()
return pytest.mark.large


PROBLEM_SIZES = [2, 8, 16, 22]

DTYPE_SIZE_PAIRS = [
(dt, 2**log_size) for dt in DTYPE_LIST for log_size in PROBLEM_SIZES
pytest.param(dt, 2**log_size, marks=get_mark(dt, log_size))
for dt in DTYPE_LIST
for log_size in PROBLEM_SIZES
]


Expand Down
Loading