[STF] Add python bindings#5315
Conversation
|
/ok to test c9acb99 |
|
/ok to test 6971d8f |
|
/ok to test 2f7299e |
🟨 CI finished in 1h 40m: Pass: 91%/205 | Total: 1d 11h | Avg: 10m 28s | Max: 43m 15s | Hits: 96%/340562
|
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| CCCL Packaging | |
| libcu++ | |
| CUB | |
| Thrust | |
| CUDA Experimental | |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| +/- | CCCL Packaging |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 205)
| # | Runner |
|---|---|
| 128 | linux-amd64-cpu16 |
| 23 | windows-amd64-cpu16 |
| 14 | linux-amd64-gpu-h100-latest-1 |
| 14 | linux-amd64-gpu-rtxa6000-latest-1 |
| 12 | linux-arm64-cpu16 |
| 11 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
|
/ok to test fa8c960 |
🟨 CI finished in 1h 10m: Pass: 90%/205 | Total: 1d 13h | Avg: 10m 59s | Max: 39m 22s | Hits: 96%/340547
|
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| CCCL Packaging | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| +/- | CCCL Packaging |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 205)
| # | Runner |
|---|---|
| 128 | linux-amd64-cpu16 |
| 23 | windows-amd64-cpu16 |
| 14 | linux-amd64-gpu-h100-latest-1 |
| 14 | linux-amd64-gpu-rtxa6000-latest-1 |
| 12 | linux-arm64-cpu16 |
| 11 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
|
/ok to test f3b57da |
🟨 CI finished in 1h 05m: Pass: 89%/205 | Total: 1d 13h | Avg: 10m 53s | Max: 40m 23s | Hits: 95%/340359
|
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| CCCL Packaging | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| +/- | CCCL Packaging |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 205)
| # | Runner |
|---|---|
| 128 | linux-amd64-cpu16 |
| 23 | windows-amd64-cpu16 |
| 14 | linux-amd64-gpu-h100-latest-1 |
| 14 | linux-amd64-gpu-rtxa6000-latest-1 |
| 12 | linux-arm64-cpu16 |
| 11 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
|
/ok to test 4fb7000 |
🟨 CI finished in 1h 41m: Pass: 89%/205 | Total: 1d 12h | Avg: 10m 49s | Max: 45m 35s | Hits: 97%/340383
|
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| CCCL Packaging | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| +/- | CCCL Infrastructure |
| +/- | CCCL Packaging |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 205)
| # | Runner |
|---|---|
| 128 | linux-amd64-cpu16 |
| 23 | windows-amd64-cpu16 |
| 14 | linux-amd64-gpu-h100-latest-1 |
| 14 | linux-amd64-gpu-rtxa6000-latest-1 |
| 12 | linux-arm64-cpu16 |
| 11 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
|
/ok to test 9acc75b |
This comment has been minimized.
This comment has been minimized.
Harden the Cython bindings and interop, correct numerical examples, and apply review-driven test/doc cleanup: - Bound the Dopri5/CG adaptive loops with device-side caps and finite checks; reset persistent RK4 state per invocation and key its warmup on step size. - Make the Jacobi (numba/pytorch/warp) tests assert finite residuals below tolerance, unchanged boundaries, and an evolved interior. - FHE examples support arbitrary lengths, preserve keys in empty_like(), and reject mismatched contexts/lengths/keys. - Fix Cholesky timing to synchronize STF work before measuring, and move the STF-binding skip before optional CuPy/nvmath imports in Cholesky/POTRI. - Vectorize the stencil reference, compile the shared AXPY kernel once, and replace dynamic exec in the example runner with a direct call. - Correct "Stream Task Flow" -> "Sequential Task Flow" references, drop the untested Python 3.14 classifier, and quote STF pip extras in the docs.
|
/ok to test b9b1254 |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (2)
python/cuda_stf/tests/stf/test_from_context.py (1)
140-150: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuesuggestion:
pytest.importorskip("cupy")runs only after_require_cuda_core_device(),_require_green_context()andfrom_context(). When cupy is absent this allocates a green context just to skip. Move the importorskip above the setup so the skip happens before any device/context work.python/cuda_stf/tests/stf/interop/test_numba.py (1)
396-398: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuesuggestion:
pytest.skip()raisesSkipped, so the followingreturnis dead code. Drop it.diff
if len(list(cuda.gpus)) < 2: pytest.skip("Need at least 2 GPUs") - return
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 06cedf7b-a718-42ed-b1ef-b699d8fb1cf6
📒 Files selected for processing (79)
.github/CODEOWNERSAGENTS.mdci/build_cuda_stf_combined_python.shci/build_cuda_stf_python.shci/build_cuda_stf_wheel.shci/matrix.yamlci/project_files_and_dependencies.yamlci/test/inspect_changes/c2h_dependency.outputci/test_cuda_stf_python.shci/util/workflow/get_wheel_artifact_name.shdocs/conf.pydocs/python/api_reference.rstdocs/python/index.rstdocs/python/setup.rstdocs/python/stf.rstdocs/python/stf_api.rstpython/cuda_stf/.gitignorepython/cuda_stf/CMakeLists.txtpython/cuda_stf/LICENSEpython/cuda_stf/README.mdpython/cuda_stf/cuda/stf/_experimental/__init__.pypython/cuda_stf/cuda/stf/_experimental/_cuda_version_utils.pypython/cuda_stf/cuda/stf/_experimental/_stf_bindings.pypython/cuda_stf/cuda/stf/_experimental/_stf_bindings_impl.pyxpython/cuda_stf/cuda/stf/_experimental/_stream_utils.pypython/cuda_stf/cuda/stf/_experimental/device_array.pypython/cuda_stf/cuda/stf/_experimental/fill_utils.pypython/cuda_stf/cuda/stf/_experimental/green_places.pypython/cuda_stf/cuda/stf/_experimental/interop/__init__.pypython/cuda_stf/cuda/stf/_experimental/interop/numba.pypython/cuda_stf/cuda/stf/_experimental/interop/pytorch.pypython/cuda_stf/cuda/stf/_experimental/paths.pypython/cuda_stf/cuda/stf/_experimental/task_graph.pypython/cuda_stf/merge_cuda_wheels.pypython/cuda_stf/pyproject.tomlpython/cuda_stf/tests/stf/examples/__init__.pypython/cuda_stf/tests/stf/examples/bicgstab.pypython/cuda_stf/tests/stf/examples/burger.pypython/cuda_stf/tests/stf/examples/burger_reference.pypython/cuda_stf/tests/stf/examples/cg.pypython/cuda_stf/tests/stf/examples/cholesky.pypython/cuda_stf/tests/stf/examples/fhe.pypython/cuda_stf/tests/stf/examples/fhe_decorator.pypython/cuda_stf/tests/stf/examples/neural_ode_dopri5.pypython/cuda_stf/tests/stf/examples/neural_ode_rk4.pypython/cuda_stf/tests/stf/examples/potri.pypython/cuda_stf/tests/stf/examples/stackable_branch_while_warp.pypython/cuda_stf/tests/stf/interop/__init__.pypython/cuda_stf/tests/stf/interop/test_cuda_compute.pypython/cuda_stf/tests/stf/interop/test_decorator.pypython/cuda_stf/tests/stf/interop/test_fdtd.pypython/cuda_stf/tests/stf/interop/test_jacobi_numba.pypython/cuda_stf/tests/stf/interop/test_jacobi_pytorch.pypython/cuda_stf/tests/stf/interop/test_jacobi_warp.pypython/cuda_stf/tests/stf/interop/test_legacy_to_stf.pypython/cuda_stf/tests/stf/interop/test_local_stf_capture.pypython/cuda_stf/tests/stf/interop/test_numba.pypython/cuda_stf/tests/stf/interop/test_pytorch.pypython/cuda_stf/tests/stf/interop/test_pytorch_task_context.pypython/cuda_stf/tests/stf/interop/test_scoped_capture.pypython/cuda_stf/tests/stf/interop/test_stencil_decorator.pypython/cuda_stf/tests/stf/interop/test_warp_pytorch_dag.pypython/cuda_stf/tests/stf/test_cai.pypython/cuda_stf/tests/stf/test_composite_places.pypython/cuda_stf/tests/stf/test_context.pypython/cuda_stf/tests/stf/test_cuda_kernel.pypython/cuda_stf/tests/stf/test_fill_utils.pypython/cuda_stf/tests/stf/test_from_context.pypython/cuda_stf/tests/stf/test_graph_scope.pypython/cuda_stf/tests/stf/test_host_launch.pypython/cuda_stf/tests/stf/test_launchable_graph.pypython/cuda_stf/tests/stf/test_lifecycle.pypython/cuda_stf/tests/stf/test_nested_scopes.pypython/cuda_stf/tests/stf/test_packaging.pypython/cuda_stf/tests/stf/test_place_support.pypython/cuda_stf/tests/stf/test_stream_utils.pypython/cuda_stf/tests/stf/test_task_graph.pypython/cuda_stf/tests/stf/test_token.pypython/cuda_stf/tests/test_examples.py
…bindings
Add stf_stackable_while_cond_multi(): a single condition task that reads up
to STF_WHILE_COND_MAX_TERMS scalar logical data, evaluates each
(*ld <op> threshold) term (with optional negation) and folds the results
with an ALL (AND) or ANY (OR) combiner before updating the conditional
handle. The term pack is passed by value through kernel parameters, so the
kernel stays a single-thread launch with no device allocation, and
duplicate logical data across terms share one read dependency.
stf_stackable_while_cond_scalar() now delegates to the multi-term path.
On the Python side, stf.cond(ld, op, threshold) is the canonical leaf
constructor; leaves combine with & / | and negate with ~ (De Morgan keeps
compounds flat), and mixed &/| nesting is rejected. The ordering operators
on stackable_logical_data (ld > x, ...) are sugar lowering onto stf.cond,
restricted to real-scalar right-hand sides; == / != keep their identity
semantics and hashing is explicitly preserved. loop.continue_while()
accepts either the legacy (ld, op, threshold) triple or an expression:
loop.continue_while((lres > tol_sq) & (liter < max_iter))
This removes the need to allocate a synthetic condition scalar and spend a
dedicated task combining subconditions inside the loop body.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every example that combined a convergence test with an iteration cap did so
by allocating a synthetic condition scalar and spending a dedicated task to
fuse the two tests into it. Express those directly instead:
loop.continue_while((ltmp > tol_sq) & (liter < max_iter))
- bicgstab.py / burger.py (BiCGSTAB and Newton loops): drop the cond
logical data and the combining pytorch_task.
- cg.py: drop the torch.where() iteration-cap control scalar.
- neural_ode_dopri5.py: the body task stores the raw "not finished" flag;
the iteration cap moves into the loop condition.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
continue_while() and the loop's raw conditional handle were previously undocumented; cover both, plus the new cond leaf constructor, the &/|/~ combinators and the operator sugar on stackable logical data. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The narrative guide never covered while_loop/repeat scopes. Document the conditional-graph-node loops on stackable_context: at-least-once body semantics, the condition-applies-to-the-next-replay rule, compound continue_while conditions (with stf.cond as the canonical lower-level form), and the raw cond_handle escape hatch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop the narrative guide's suggestion to launch a custom predicate kernel on loop.cond_handle: cudaGraphSetConditional() is a device-runtime function that Numba/PyTorch kernels cannot call, so the escape hatch is not casually reachable from Python. Keep the attribute in the API reference with the RDC + cudadevrt requirements spelled out, steering users to continue_while(). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| # define STF_WHILE_COND_MAX_TERMS 8 | ||
|
|
||
| //! \brief Combiner for multi-term while conditions. | ||
| typedef enum stf_cond_combiner |
There was a problem hiding this comment.
This could be extracted as as standalone PR (C combined conditions)
Mirror the fixes the regular logical_data path already had, which the stackable factory never received: - Require C-contiguous buffer-protocol exporters (PyBUF_C_CONTIGUOUS): the registered byte range is interpreted with the stored C-order shape, so a Fortran-ordered exporter was silently read in the wrong element order. - Keep the Py_buffer export alive until __dealloc__ instead of releasing it immediately: STF holds view.buf and may touch it asynchronously, and a resizable exporter (e.g. bytearray) could reallocate after release, leaving STF with a stale pointer. The held export also makes resize attempts fail loudly with BufferError. - Capture the source's readonly flag (CAI and buffer protocol), expose it as .readonly, and reject write()/rw() deps and write-capable push() modes on read-only sources. A read-only source is additionally auto-marked STF-level read-only: the stackable auto-import otherwise promotes even read accesses in nested scopes to an RW freeze, which triggers a pop/finalize write-back into memory the exporter declared immutable. set_read_only() now also raises the Python-side flag so misuse fails with a clear ValueError instead of a release-mode compiled-out C++ assertion. Add regression tests for all of the above across both context types, including the previously untested readonly-rejection path of the regular context. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mirror pytorch_task: a failing t.end() in __enter__'s error path or in __exit__ while a body exception is propagating must not mask the original failure; only surface cleanup errors when the body succeeded. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
check_result defaulted to False, so the example harness (which calls main() with default arguments) only exercised control flow without ever validating the math. Check by default and replace the CLI --check flag with --no-check for benchmarking runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
logical_data() previously rejected any CUDA Array Interface object that advertised a producer stream. Honor the CAI v3 contract instead: the consumer must order against the producer stream before touching the data, so synchronize the advertised stream once at registration (matching what Numba does on import). None means no synchronization, 1/2 map directly to the runtime's legacy/per-thread default stream handles, other values are raw cudaStream_t handles; 0 is rejected as the spec disallows it. An asynchronous producer-to-STF prerequisite (event wait instead of a host synchronization) can replace this later without an API change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Point at the complete tested program in tests/stf/test_cuda_kernel.py so readers know where the undefined names (ctx, lX, kernel, ...) come from. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same treatment as the cuda_kernel snippet: point at the complete tested program in tests/stf/interop/test_cuda_compute.py. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- test_from_context: importorskip("cupy") before device/green-context
setup so a missing cupy skips without allocating a green context.
- test_numba: drop dead return after pytest.skip().
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
😬 CI Workflow Results🟥 Finished in 2h 37m: Pass: 91%/528 | Total: 18d 13h | Max: 2h 36m | Hits: 36%/1869685See results here. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (4)
python/cuda_stf/tests/test_examples.py (1)
121-129: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valuesuggestion: add a
timeout=tosubprocess.runso a hanging example fails the test instead of stalling CI indefinitely.python/cuda_stf/tests/stf/examples/cg.py (1)
5-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuesuggestion: docstring lists
host_launchunder "Demonstrates" (Line 12), but this example never callshost_launch. Drop that bullet to keep the teaching doc accurate.python/cuda_stf/tests/stf/examples/potri.py (1)
1033-1102: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winsuggestion: the timed region (
start_timeat Line 1034 →end_timeat Line 1093) wraps thecheck_resultmatrix fills (host Python loops, Lines 1063-1075), thecompute_normhost tasks, andfinalize. Soelapsed_ms/GFLOPS is inflated by verification/setup work whencheck_result=True. Mirrorcholesky.py: bracket only the POTRI submission with adeviceSynchronize, and prefertime.perf_counter()overtime.time().python/cuda_stf/cuda/stf/_experimental/_stf_bindings_impl.pyx (1)
3279-3298: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuesuggestion:
terms[8]and then > 8bound are hardcoded whileSTF_WHILE_COND_MAX_TERMSis declared as an extern C constant (and_combine_condat Line 3739 repeats the literal 8). If the C side ever changes the max, these silently diverge. Consider centralizing on the C constant.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: abc605ed-4698-4aff-ba70-c12f40e878eb
📒 Files selected for processing (83)
.github/CODEOWNERSAGENTS.mdc/experimental/stf/include/cccl/c/experimental/stf/stf.hc/experimental/stf/src/stf.cuc/experimental/stf/test/test_stackable.cuci/build_cuda_stf_combined_python.shci/build_cuda_stf_python.shci/build_cuda_stf_wheel.shci/matrix.yamlci/project_files_and_dependencies.yamlci/test/inspect_changes/c2h_dependency.outputci/test_cuda_stf_python.shci/util/workflow/get_wheel_artifact_name.shdocs/conf.pydocs/python/api_reference.rstdocs/python/index.rstdocs/python/setup.rstdocs/python/stf.rstdocs/python/stf_api.rstpython/cuda_stf/.gitignorepython/cuda_stf/CMakeLists.txtpython/cuda_stf/LICENSEpython/cuda_stf/README.mdpython/cuda_stf/cuda/stf/_experimental/__init__.pypython/cuda_stf/cuda/stf/_experimental/_cuda_version_utils.pypython/cuda_stf/cuda/stf/_experimental/_stf_bindings.pypython/cuda_stf/cuda/stf/_experimental/_stf_bindings_impl.pyxpython/cuda_stf/cuda/stf/_experimental/_stream_utils.pypython/cuda_stf/cuda/stf/_experimental/device_array.pypython/cuda_stf/cuda/stf/_experimental/fill_utils.pypython/cuda_stf/cuda/stf/_experimental/green_places.pypython/cuda_stf/cuda/stf/_experimental/interop/__init__.pypython/cuda_stf/cuda/stf/_experimental/interop/numba.pypython/cuda_stf/cuda/stf/_experimental/interop/pytorch.pypython/cuda_stf/cuda/stf/_experimental/paths.pypython/cuda_stf/cuda/stf/_experimental/task_graph.pypython/cuda_stf/merge_cuda_wheels.pypython/cuda_stf/pyproject.tomlpython/cuda_stf/tests/stf/examples/__init__.pypython/cuda_stf/tests/stf/examples/bicgstab.pypython/cuda_stf/tests/stf/examples/burger.pypython/cuda_stf/tests/stf/examples/burger_reference.pypython/cuda_stf/tests/stf/examples/cg.pypython/cuda_stf/tests/stf/examples/cholesky.pypython/cuda_stf/tests/stf/examples/fhe.pypython/cuda_stf/tests/stf/examples/fhe_decorator.pypython/cuda_stf/tests/stf/examples/neural_ode_dopri5.pypython/cuda_stf/tests/stf/examples/neural_ode_rk4.pypython/cuda_stf/tests/stf/examples/potri.pypython/cuda_stf/tests/stf/examples/stackable_branch_while_warp.pypython/cuda_stf/tests/stf/interop/__init__.pypython/cuda_stf/tests/stf/interop/test_cuda_compute.pypython/cuda_stf/tests/stf/interop/test_decorator.pypython/cuda_stf/tests/stf/interop/test_fdtd.pypython/cuda_stf/tests/stf/interop/test_jacobi_numba.pypython/cuda_stf/tests/stf/interop/test_jacobi_pytorch.pypython/cuda_stf/tests/stf/interop/test_jacobi_warp.pypython/cuda_stf/tests/stf/interop/test_legacy_to_stf.pypython/cuda_stf/tests/stf/interop/test_local_stf_capture.pypython/cuda_stf/tests/stf/interop/test_numba.pypython/cuda_stf/tests/stf/interop/test_pytorch.pypython/cuda_stf/tests/stf/interop/test_pytorch_task_context.pypython/cuda_stf/tests/stf/interop/test_scoped_capture.pypython/cuda_stf/tests/stf/interop/test_stencil_decorator.pypython/cuda_stf/tests/stf/interop/test_warp_pytorch_dag.pypython/cuda_stf/tests/stf/test_cai.pypython/cuda_stf/tests/stf/test_composite_places.pypython/cuda_stf/tests/stf/test_context.pypython/cuda_stf/tests/stf/test_cuda_kernel.pypython/cuda_stf/tests/stf/test_fill_utils.pypython/cuda_stf/tests/stf/test_from_context.pypython/cuda_stf/tests/stf/test_graph_scope.pypython/cuda_stf/tests/stf/test_host_launch.pypython/cuda_stf/tests/stf/test_launchable_graph.pypython/cuda_stf/tests/stf/test_lifecycle.pypython/cuda_stf/tests/stf/test_nested_scopes.pypython/cuda_stf/tests/stf/test_packaging.pypython/cuda_stf/tests/stf/test_place_support.pypython/cuda_stf/tests/stf/test_stream_utils.pypython/cuda_stf/tests/stf/test_task_graph.pypython/cuda_stf/tests/stf/test_token.pypython/cuda_stf/tests/stf/test_while_cond.pypython/cuda_stf/tests/test_examples.py
- cg.py: drop the host_launch docstring bullet, the example never calls it - potri.py: bracket only the POTRI submission with device synchronizes and time.perf_counter(), matching cholesky.py, so verification and finalize no longer inflate the reported GFLOPS - _stf_bindings_impl.pyx: use the STF_WHILE_COND_MAX_TERMS C constant instead of hardcoded 8s for while-condition term limits Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
If _get_stream_pointer raised on a malformed stream argument after the _PrimaryContextPin was acquired, context.__cinit__ aborted with _ctx still NULL, and since _PrimaryContextPin.__dealloc__ is a deliberate no-op the primary-context retains leaked until process exit. Resolve the stream pointer first so argument validation cannot strand the pin. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Description
Introduce python bindings for CUDASTF
closes
Checklist