Skip to content
Open
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: 6 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@

cuda.bindings:
- changed-files:
- any-glob-to-any-file: 'cuda_bindings/**'
- any-glob-to-any-file:
- 'cuda_bindings/**'
- 'samples/cuda_bindings/**'

cuda.core:
- changed-files:
- any-glob-to-any-file: 'cuda_core/**'
- any-glob-to-any-file:
- 'cuda_core/**'
- 'samples/cuda_core/**'

cuda.pathfinder:
- changed-files:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ jobs:
}

{
echo "bindings=$(has_match '^cuda_bindings/')"
echo "core=$(has_match '^cuda_core/')"
echo "bindings=$(has_match '^(cuda_bindings/|samples/cuda_bindings/)')"
echo "core=$(has_match '^(cuda_core/|samples/cuda_core/)')"
echo "pathfinder=$(has_match '^cuda_pathfinder/')"
echo "python_meta=$(has_match '^cuda_python/')"
echo "test_helpers=$(has_match '^cuda_python_test_helpers/')"
echo "shared=$(has_match '^(\.github/|ci/|scripts/|toolshed/|conftest\.py$|pyproject\.toml$|pixi\.(toml|lock)$|pytest\.ini$|ruff\.toml$)')"
echo "shared=$(has_match '^(\.github/|ci/|scripts/|toolshed/|samples/README\.md$|conftest\.py$|pyproject\.toml$|pixi\.(toml|lock)$|pytest\.ini$|ruff\.toml$)')"
} >> "$GITHUB_OUTPUT"

- name: Compose gating outputs
Expand Down
5 changes: 4 additions & 1 deletion .spdx-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ LICENSE*
.gitattributes
.gitignore
requirements*.txt
cuda_bindings/examples/*

# Samples are synced to NVIDIA/cuda-samples on release and carry either the
# upstream verbose BSD-style copyright header or an SPDX identifier.
samples/**/*.py

# Vendored
cuda_core/cuda/core/_include/dlpack.h
Expand Down
6 changes: 6 additions & 0 deletions ci/tools/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ elif [[ "${test_module}" == "core" || "${test_module}" == nightly-* ]]; then
# Constrain cuda-toolkit to the requested CTK version to avoid
# pip pulling in a newer nvidia-cuda-runtime that conflicts with it.
pip install "${CORE_WHL[@]}" --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}" "cuda-toolkit==${TEST_CUDA_MAJOR_MINOR}.*"
# Optional deps needed by some cuda.core samples exercised in this suite.
# CuPy already comes from the
# test-cuXX group; install the rest best-effort so those samples run
# instead of being waived. Samples with heavier/unavailable deps stay waived.
echo "Installing optional sample deps (nvtx, pillow)"
pip install nvtx pillow || echo "Warning: optional sample deps install failed; affected samples will be waived"
echo "Installed packages before core tests:"
pip list
echo "Running core tests"
Expand Down
4 changes: 4 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def pytest_collection_modifyitems(config, items): # noqa: ARG001
if nodeid.startswith("tests/integration/") or "/tests/integration/" in nodeid:
item.add_marker(pytest.mark.smoke)

# Each package owns the sample wrapper under its example_tests subtree.
if "example_tests/test_samples.py" in nodeid:
item.add_marker(pytest.mark.samples)

# Cython tests (any tests/cython subtree)
if (
"/tests/cython/" in nodeid
Expand Down
2 changes: 1 addition & 1 deletion cuda_bindings/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ subpackage in the `cuda-python` monorepo.
- **Cython tests**:
- build: `tests/cython/build_tests.sh` (or platform equivalent)
- run: `pytest tests/cython/`
- **Examples**: example coverage is pytest-based under `examples/`.
- **Samples**: sample coverage is pytest-based under `../samples/cuda_bindings/`.
- **Benchmarks**: run with `pytest --benchmark-only benchmarks/` when needed.

## Build and environment notes
Expand Down
2 changes: 1 addition & 1 deletion cuda_bindings/DESCRIPTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cuda-bindings: Low-level CUDA interfaces

* `Repository <https://github.com/NVIDIA/cuda-python/tree/main/cuda_bindings>`_
* `Documentation <https://nvidia.github.io/cuda-python/cuda-bindings/>`_
* `Examples <https://github.com/NVIDIA/cuda-python/tree/main/cuda_bindings/examples>`_
* `Examples <https://github.com/NVIDIA/cuda-python/tree/main/samples/cuda_bindings>`_
* `Issue tracker <https://github.com/NVIDIA/cuda-python/issues/>`_

For the installation instruction, please refer to the `Installation <https://nvidia.github.io/cuda-python/cuda-bindings/latest/install.html>`_ page.
17 changes: 0 additions & 17 deletions cuda_bindings/cuda/bindings/_example_helpers/__init__.py

This file was deleted.

96 changes: 0 additions & 96 deletions cuda_bindings/cuda/bindings/_example_helpers/common.py

This file was deleted.

48 changes: 0 additions & 48 deletions cuda_bindings/cuda/bindings/_example_helpers/helper_cuda.py

This file was deleted.

15 changes: 0 additions & 15 deletions cuda_bindings/cuda/bindings/_example_helpers/helper_string.py

This file was deleted.

16 changes: 14 additions & 2 deletions cuda_bindings/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,23 @@ def _html_baseurl():

extlinks = {
"cuda-bindings-example": (
f"https://github.com/NVIDIA/cuda-python/blob/{GITHUB_EXAMPLES_REF}/cuda_bindings/examples/%s",
f"https://github.com/NVIDIA/cuda-python/blob/{GITHUB_EXAMPLES_REF}/samples/cuda_bindings/%s",
"%s",
),
"cuda-bindings-examples": (
f"https://github.com/NVIDIA/cuda-python/tree/{GITHUB_EXAMPLES_REF}/cuda_bindings/examples%s",
f"https://github.com/NVIDIA/cuda-python/tree/{GITHUB_EXAMPLES_REF}/samples/cuda_bindings%s",
"%s",
),
"sample": (
f"https://github.com/NVIDIA/cuda-python/tree/{GITHUB_EXAMPLES_REF}/samples/cuda_bindings/%s",
"%s",
),
"samples": (
f"https://github.com/NVIDIA/cuda-python/tree/{GITHUB_EXAMPLES_REF}/samples/cuda_bindings%s",
"%s",
),
"cuda-core-sample": (
f"https://github.com/NVIDIA/cuda-python/tree/{GITHUB_EXAMPLES_REF}/samples/cuda_core/%s",
"%s",
),
}
Expand Down
Loading