Workflow for executing examples - #445
Merged
oleksandr-pavlyk merged 28 commits intoAug 4, 2026
Merged
Conversation
```
usage: run_python_examples.py [-h] [--group {all,autotune,core-cccl,cpu,cuda-compute,cupy,cute,example-cpu,gpu,light-gpu,numba,pr,smoke,syntax,torch}] [--case CASE] [--python PYTHON] [--repo-root REPO_ROOT] [--device DEVICE] [--timeout TIMEOUT]
[--skip-missing-deps] [--continue-on-failure] [--verbose] [--list]
Run syntax and smoke checks for committed Python examples.
options:
-h, --help show this help message and exit
--group {all,autotune,core-cccl,cpu,cuda-compute,cupy,cute,example-cpu,gpu,light-gpu,numba,pr,smoke,syntax,torch}
Group to run. May be specified multiple times. Defaults to 'syntax'. Use 'pr' for syntax plus CPU-only smoke.
--case CASE Run a selected case from the selected groups. May be repeated.
--python PYTHON Python executable used for checks and example subprocesses.
--repo-root REPO_ROOT
Repository root. Defaults to the parent directory of this script.
--device DEVICE NVBench device selector passed to GPU examples. Defaults to 0.
--timeout TIMEOUT Timeout in seconds for the syntax check.
--skip-missing-deps Skip runtime cases whose required Python modules are not installed.
--continue-on-failure
Continue running later cases after a failure.
--verbose Print stdout/stderr from passing commands.
--list List known groups and runtime cases, then exit.
```
This is intended for running examples in CI to ensure that examples remain current against changes upstream
test_python_examples_inner checks that workspace directory exists before executing find command that access it
Use a checked-in constraints file for required Python example CI so unrelated upstream dependency releases do not break PRs. Add a floating dependency mode for scheduled/manual runs that prints full pip freezes and a filtered constraints candidate for tracked packages. Rename the aggregate example requirements file to all-cu13.txt to make the CUDA 13 scope explicit.
Address other review feedback points
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
📝 WalkthroughSummary by CodeRabbit
WalkthroughSummaryThe pull request adds GPU CI coverage for Python examples, containerized test scripts, dependency constraints, an example runner, stream keyword fixes, and a CuPy benchmark. ChangesPython example CI
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Comment |
Introduce iter_requirement_lines in format_python_example_constraints parse_constraint_names/parse_requirement_names iterate over iterator returned by this function.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
oleksandr-pavlyk
marked this pull request as ready for review
August 3, 2026 21:40
oleksandr-pavlyk
commented
Aug 4, 2026
shwina
approved these changes
Aug 4, 2026
shwina
left a comment
Collaborator
There was a problem hiding this comment.
Python changes look good to me. I didn't review the CI scripts in much detail but they should be fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
Fixes code in examples to change
streamargument ofMemoryResource.allocatemethod from position to keyword. Recent changes incuda.coremade the argument keyword-only one.Adds
python/examples/stream.pyexample, parallel to C++examples/stream.cuAdds a workflow to run examples periodically, manually and as part of PR to ensure that examples remain runnable.
python/examples/*.pyfrom main branchpython/examples/requirements/constraints-cu13-py313.txtCloses #444