Skip to content
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
637 commits
Select commit Hold shift + click to select a range
1457893
Reject non-contiguous buffers in logical_data
caugonnet Apr 6, 2026
cf7753f
Normalize and validate shape in logical_data.init_by_shape
caugonnet Apr 6, 2026
1f80e6a
pre-commit hooks
caugonnet Apr 6, 2026
1e29a51
Guard CuPy imports in example_potri and example_cholesky
caugonnet Apr 6, 2026
fb5dddf
Add finiteness assertions and clean up FDTD tests
caugonnet Apr 6, 2026
76c7bae
pre-commit hooks
caugonnet Apr 6, 2026
9e95107
Add host_launch to Python STF bindings
caugonnet Apr 6, 2026
8fe3c16
Add stf_fence binding to Python STF context
caugonnet Apr 6, 2026
c9cee96
Expose task.set_symbol() and ctx.task(symbol=) in Python STF bindings
caugonnet Apr 6, 2026
224eba1
Add cuda_kernel bindings to Python STF for efficient CUDA kernel laun…
caugonnet Apr 6, 2026
3cbbdd5
Fix cuda_kernel.launch() to keep all ParamHolder args alive for multi…
caugonnet Apr 6, 2026
f3ef1cd
Harden Python STF bindings with NULL checks and safe __dealloc__
caugonnet Apr 6, 2026
34e7139
Add exec_place_grid, composite data places, and FFI-safe partition_fn_t
caugonnet Apr 6, 2026
21ae4ec
Add task grid introspection: get_grid_dims, get_stream_at_index, get_…
caugonnet Apr 6, 2026
e19673d
Fix unused variable lint warnings in test_composite_places.py
caugonnet Apr 6, 2026
be2552b
Apply ruff-format to test_cuda_kernel.py
caugonnet Apr 6, 2026
3c77d25
Add STF + cuda.compute integration examples (reduce, scan, transform)
caugonnet Apr 6, 2026
0dc2d03
Add ctx.wait(), fix logical_data GC bug, numba_task helper, and simpl…
caugonnet Apr 7, 2026
cbbcc2f
Add task-free place support: exec_place_scope, pick_stream, get_place…
caugonnet Apr 7, 2026
cb05626
Expose data_place::allocate/deallocate through C API, Python bindings…
caugonnet Apr 7, 2026
49ddbe9
Merge branch 'main' into stf_c_api
caugonnet Apr 7, 2026
cab9f71
Merge branch 'main' into stf_c_api
caugonnet Apr 7, 2026
64d5848
Merge branch 'main' into stf_c_api
caugonnet Apr 7, 2026
486ca13
Add exec_place._handle_int property for FFI/ctypes interop
caugonnet Apr 7, 2026
6ed1987
Add STF green context bindings for Python.
caugonnet Apr 8, 2026
bb67603
[STF] Move stream pools to per-handle exec_place_resources registry
caugonnet Apr 20, 2026
7f72b99
[STF] Thread exec_place_resources through stream lookup call sites
caugonnet Apr 20, 2026
dab73bd
[STF] Add C++ tests and docs for explicit exec_place_resources stream…
caugonnet Apr 20, 2026
11b8b8b
[STF] Add C API and Python bindings for stackable contexts and exec_p…
caugonnet Apr 20, 2026
c0fd7d7
[STF] Add stackable-context Python test suite
caugonnet Apr 20, 2026
d547abc
pre-commit hooks
caugonnet Apr 20, 2026
3993bf4
[STF] Port linear algebra examples to nvmath-python + STF workspaces
caugonnet Apr 21, 2026
689c531
[STF] Add no_export empty stackable logical data in C API + Python
caugonnet Apr 22, 2026
93ecafd
[STF] Add explicit push() on stackable logical data in C API + Python
caugonnet Apr 22, 2026
17a2bf7
[STF] Expose async_resources_handle and caller-stream context in Python
caugonnet Apr 23, 2026
faf493b
[STF] Split stackable_ctx::pop() into pop_prologue/pop_epilogue
caugonnet Apr 26, 2026
c283065
[STF] Add C API and Python bindings for launchable stackable pop
caugonnet Apr 26, 2026
829268f
[STF] Make stream_ctx capture-safe and chain across back-to-back cont…
caugonnet Apr 26, 2026
6e857a9
[STF] Add shared-ownership launchable_graph for stackable_ctx
caugonnet Apr 26, 2026
2ae0272
[STF] C API for shared-ownership launchable_graph
caugonnet Apr 26, 2026
7c5b72f
[STF] Python bindings for shared-ownership launchable_graph
caugonnet Apr 26, 2026
32ddf6d
[STF] Add wp_stf Warp adapter and mixed Warp+PyTorch DAG tests
caugonnet Apr 29, 2026
d484e62
[STF] Fix C-facade dispatch for stackable tokens
caugonnet Apr 29, 2026
817bb50
[STF] Make graph_task and stream_task move-only
caugonnet Apr 29, 2026
947d0d2
[STF] Apply pre-commit hook reformatting
caugonnet Apr 29, 2026
f8b7fdd
Use an appropriate description of the DAG which is not a diamond shape
caugonnet Apr 30, 2026
5691af8
Merge main into STF Python bindings
andralex May 1, 2026
5f97c52
Merge remote-tracking branch 'caugonnet/stf_c_api' into work/pr-5315-…
andralex May 1, 2026
1e7c033
Merge remote-tracking branch 'origin/main' into work/pr-5315-merge-fix
andralex May 4, 2026
b3e6867
[STF] Fix CI after main merge
andralex May 4, 2026
81ca39a
[STF] Capture directly into ctx_graph on CTK 12.3+ via cudaStreamBegi…
caugonnet May 5, 2026
4492a10
[STF] Fix cudaErrorStreamCaptureIsolation on token().read() in capture
caugonnet May 6, 2026
e6965a9
[STF] Forward graph_scope finalize_prereqs into parent context
caugonnet May 6, 2026
4f2fb3c
Merge branch 'main' into stf_c_api
caugonnet May 12, 2026
04ec9ad
Remove Warp utility
caugonnet May 11, 2026
160396c
Warp/STF related wrappers are in Warp now
caugonnet May 11, 2026
66aba5b
Expose logical data initializers on stackable STF contexts
caugonnet May 18, 2026
c71b509
Test stackable logical data initializers
caugonnet May 18, 2026
98e3af5
pre-commit hooks
caugonnet May 18, 2026
c1f3eed
Merge branch 'main' into stf_c_api
caugonnet May 18, 2026
55f34c9
Merge branch 'main' into stf_c_api
caugonnet May 18, 2026
fae0627
This test would belong to Warp
caugonnet May 18, 2026
9a54c5a
Remove eager Burger PyTorch reference
caugonnet May 18, 2026
ee49ef6
Add branch while stackable graph example
caugonnet May 18, 2026
0b5262d
Add Python STF task graph helper
caugonnet May 18, 2026
cd232da
Merge remote-tracking branch 'upstream/main' into stf_c_api
caugonnet May 19, 2026
b5939a5
Merge origin/main into stf_c_api
caugonnet May 19, 2026
243062a
pre-commit hooks
caugonnet May 19, 2026
4459823
Use vector in STF places test buffer
caugonnet May 20, 2026
87ce7c8
Merge branch 'main' into stf_c_api
caugonnet May 20, 2026
438acb7
Merge branch 'main' into stf_c_api
andralex May 20, 2026
4e91f5d
Merge branch 'main' into stf_c_api
caugonnet May 21, 2026
12b4129
Merge branch 'main' into stf_c_api
caugonnet May 21, 2026
551d760
Document STF FHE composability examples
caugonnet May 22, 2026
08ce080
Merge branch 'main' into stf_c_api
caugonnet May 22, 2026
2d00b94
[STF] Port stream context capture fixes
caugonnet May 22, 2026
2b6d021
[STF] Use cuda.bindings for runtime calls
caugonnet May 22, 2026
cec4ac4
pre-commit hooks
caugonnet May 22, 2026
209e1f6
[STF] Skip Numba tests when Numba is unavailable
caugonnet May 22, 2026
c4de5c5
Merge branch 'main' into stf_c_api
caugonnet May 25, 2026
ce80f97
Merge branch 'main' into stf_c_api
caugonnet May 26, 2026
327bc18
Fix ruff import-order checks in STF tests
caugonnet May 26, 2026
4e1d024
[STF] ci: schedule base cuda.cccl wheel build for py3.13
andralex May 19, 2026
35c405d
Merge cuda-cccl-experimental into cuda-cccl as cuda.stf._experimental
caugonnet May 26, 2026
e3c3316
pre-commit hooks
caugonnet May 26, 2026
ded36ad
Remove STF debug probes and ad-hoc benchmark scripts
caugonnet May 26, 2026
545179b
Remove stray graphviz artifacts from repo root
caugonnet May 26, 2026
14d7f81
ci: drop ghost `python_experimental` project after STF merger
caugonnet May 26, 2026
f241555
Merge branch 'main' into stf_c_api
caugonnet May 26, 2026
364fee9
Merge branch 'main' into stf_c_api
caugonnet May 27, 2026
3fd17d3
[STF] Remove experimental LLM and MLP demos
caugonnet May 27, 2026
0e014b7
[STF] Remove experimental Warp simulation mockup
caugonnet May 27, 2026
ad7bb2e
[STF] Reorganize Python STF tests and promote interop adapters
caugonnet May 27, 2026
b470925
Merge branch 'main' into stf_c_api
caugonnet May 27, 2026
294b486
Merge branch 'main' into stf_c_api
caugonnet May 27, 2026
8ea81e9
pre-commit hooks
caugonnet May 27, 2026
efbcad3
Merge branch 'main' into stf_c_api
caugonnet May 27, 2026
edb3c43
Merge branch 'main' into stf_c_api
caugonnet May 28, 2026
e42c596
[STF] Use local extern C guards in C API header
caugonnet May 28, 2026
efc47ce
Merge branch 'main' into stf_c_api
caugonnet May 29, 2026
89dc425
Merge branch 'main' into stf_c_api
caugonnet May 31, 2026
01f0bf4
Merge branch 'main' into stf_c_api
caugonnet Jun 2, 2026
10568d5
do not touch this doc
caugonnet Jun 2, 2026
4fa8dc7
We don't use cccl/c/extern_c.h anymore
caugonnet Jun 2, 2026
f353320
revert useless change
caugonnet Jun 2, 2026
29ba25d
Merge branch 'main' into stf_c_api
caugonnet Jun 3, 2026
d96ced9
Update c2h_dependency inspect_changes fixture for python dep
caugonnet Jun 3, 2026
eb87418
[STF] Remove stackable_token_push_prologue debug probe
caugonnet Jun 3, 2026
d08b214
[STF] Remove duplicated stackable_ctx relaunch tests
caugonnet Jun 3, 2026
035a30a
[STF] Reframe stackable token push test comments as regression coverage
caugonnet Jun 3, 2026
6110331
[STF] Document Python interop adapters and fix stale doc links
caugonnet Jun 3, 2026
49df167
[STF] Guard optional torch/warp imports in Python STF tests
caugonnet Jun 3, 2026
a07cae1
[STF] Add missing license headers and fix set_exec_place in Python STF
caugonnet Jun 3, 2026
bbddedc
[STF] Slim and split Python Neural ODE examples
caugonnet Jun 3, 2026
dbee3d8
[STF] Reframe lifecycle test docstrings as regression coverage
caugonnet Jun 3, 2026
e65d392
Fix unified_task::get_stream(place_index) type check
caugonnet Jun 4, 2026
849f388
[STF] Skip cudax tests/examples in Python package build
caugonnet Jun 6, 2026
a1575f5
[STF] Use keyword args for cuda.compute calls in STF tests
caugonnet Jun 6, 2026
6928491
[STF] Fix broken imports and gate torch tests in STF tests
caugonnet Jun 6, 2026
eea8693
[STF] Unpack cuda-python error tuples in DeviceArray memcpy
caugonnet Jun 6, 2026
572eff3
[STF] Ship STF dev headers in cuda-cccl wheel + path discovery helpers
caugonnet Jun 6, 2026
6207eb7
[STF] Harden cuda-cccl path discovery for build isolation
caugonnet Jun 6, 2026
1aee7be
[STF] Add exec_place/data_place.from_handle and ExecPlaceLike duck-ty…
caugonnet Jun 6, 2026
10b4fb2
[STF] Test green-context places C API
caugonnet Jun 8, 2026
c238595
[STF] Avoid CuPy for zero logical data fills
caugonnet Jun 8, 2026
56818a9
[STF] Guard stf_machine_init at the C boundary
caugonnet Jun 8, 2026
908f59b
Merge branch 'main' into stf_c_api
caugonnet Jun 8, 2026
ca3c399
Merge branch 'main' into stf_c_api
caugonnet Jun 9, 2026
c71fa7e
Merge branch 'main' into stf_c_api
caugonnet Jun 9, 2026
13d88ee
[STF] Resolve graph instantiate conflict markers
caugonnet Jun 9, 2026
75b2a8c
Merge branch 'main' into stf_c_api
caugonnet Jun 9, 2026
836a023
[STF] Harden Python dep typing and path resolution
caugonnet Jun 9, 2026
cd0f0c0
[STF] Switch Burger examples to BiCGSTAB solver
caugonnet Jun 9, 2026
6f0ecf9
[STF] Skip nvmath-dependent examples when unavailable
caugonnet Jun 9, 2026
eabf767
[STF] Remove duplicate graph instantiation call
caugonnet Jun 9, 2026
2a15440
[STF] Clarify numba.jit context inference failures
caugonnet Jun 9, 2026
9af49af
[STF] Tighten numba interop error and exec_place validation
caugonnet Jun 9, 2026
3342fd1
pre-commit hooks
caugonnet Jun 9, 2026
a89c8b1
[STF] Fix stackable host_launch test and v2 build toggles
caugonnet Jun 9, 2026
07d55cf
Merge branch 'main' into stf_c_api
caugonnet Jun 9, 2026
8d6cc27
Merge branch 'main' into stf_c_api
caugonnet Jun 9, 2026
685ab5b
Update c2h inspect_changes expected lite output.
caugonnet Jun 10, 2026
82d20ce
Merge branch 'main' into stf_c_api
caugonnet Jun 10, 2026
c893ca9
[STF] Skip Python STF tests when compiled bindings are unavailable
caugonnet Jun 10, 2026
37c960c
Merge branch 'main' into stf_c_api
caugonnet Jun 10, 2026
8c05e60
pre-commit hooks
caugonnet Jun 10, 2026
f18ac6c
[STF] Remove duplicate host_launch C tests
caugonnet Jun 10, 2026
40540d5
[STF] Fix numba_task to end the STF task on setup failure
caugonnet Jun 10, 2026
677c381
[STF] Document that cross-context deps are rejected by the core
caugonnet Jun 10, 2026
20f730b
[STF] Fix and expand cuda.stf._experimental Python docs
caugonnet Jun 10, 2026
384102b
Merge branch 'main' into stf_c_api
caugonnet Jun 10, 2026
5f3e210
[STF] Use a realistic axpy chain as the Python intro example
caugonnet Jun 10, 2026
59d8620
[STF] Stabilize unfinalized context warning test
caugonnet Jun 10, 2026
4b066f7
[STF] Guard fill utils tests on bindings availability
caugonnet Jun 10, 2026
bd825ea
[STF] Scope Numba warning config in tests
caugonnet Jun 10, 2026
076fe32
[STF] Validate cuda_cccl wheel lookup in CI
caugonnet Jun 10, 2026
e32d9f3
[STF] Align lite Python STF CI version
caugonnet Jun 10, 2026
3fa91d2
[STF] Align BiCGSTAB test iteration count
caugonnet Jun 10, 2026
50188fb
[STF] Fail on unsupported PDSYMM side
caugonnet Jun 10, 2026
82194f3
[STF] Clarify stream ID handling during capture
caugonnet Jun 10, 2026
687aefb
[STF] Stabilize Warp stream cache key
caugonnet Jun 10, 2026
16ebcd5
[STF] Match Numba test sizes to launches
caugonnet Jun 10, 2026
2da1c87
Merge branch 'main' into stf_c_api
caugonnet Jun 10, 2026
d74bdd9
pre-commit hooks
caugonnet Jun 10, 2026
659a8e3
[STF] Preserve diffusion boundary values
caugonnet Jun 11, 2026
980a2e8
[STF] Remove standalone main blocks from tests
caugonnet Jun 11, 2026
34188f6
[STF] Require matplotlib for FDTD diagnostics
caugonnet Jun 11, 2026
44f8384
[STF] Validate DeviceArray inputs
caugonnet Jun 11, 2026
308ccc7
[STF] Make task graph reset cleanup-safe
caugonnet Jun 11, 2026
f6bba0c
Merge branch 'main' into stf_c_api
caugonnet Jun 11, 2026
b06e62d
[STF] Address Burger review nitpicks
caugonnet Jun 11, 2026
4600142
Merge branch 'main' into stf_c_api
caugonnet Jun 11, 2026
ade7c92
[STF] Address CodeRabbit follow-up review
caugonnet Jun 11, 2026
e892da6
pre-commit hooks
caugonnet Jun 11, 2026
05d90f0
[STF] Clarify Burger reference docstring
caugonnet Jun 11, 2026
4f93f06
Merge branch 'main' into stf_c_api
caugonnet Jun 11, 2026
b48b384
Remove stream pool changes from STF C API branch
caugonnet Jun 11, 2026
7a729d6
Restore merged stream pool comments
caugonnet Jun 11, 2026
1a08dde
Merge branch 'main' into stf_c_api
caugonnet Jun 11, 2026
bf1d107
Clarify task graph factory docs
caugonnet Jun 12, 2026
e4d533d
Merge branch 'main' into stf_c_api
caugonnet Jun 12, 2026
0f40e7a
Merge branch 'main' into stf_c_api
caugonnet Jun 22, 2026
a4917ad
stf: implement mem_create for green_ctx data place + name it by handle
caugonnet Jun 22, 2026
8cdae5e
Merge branch 'main' into stf_c_api
caugonnet Jul 1, 2026
f568c81
Merge branch 'main' into stf_c_api
caugonnet Jul 2, 2026
f2670d6
[STF] Accept CUDA stream protocol objects
caugonnet Jul 2, 2026
21d2ea7
[STF] Preserve structured CAI metadata
caugonnet Jul 2, 2026
5724d1a
[STF] Release borrowed place resources handles
caugonnet Jul 2, 2026
11f2e8a
[STF] Reject cross-context Python deps
caugonnet Jul 2, 2026
4c3c49d
Merge branch 'main' into stf_c_api
caugonnet Jul 2, 2026
9529906
pre-commit hooks
caugonnet Jul 2, 2026
5eddfed
[STF] Add multi-GPU Python CI coverage
caugonnet Jul 2, 2026
de030ef
Pin numba below 0.66 for Python CUDA extras
caugonnet Jul 2, 2026
649efcf
Merge branch 'main' into stf_c_api
caugonnet Jul 2, 2026
e8aa706
[STF] Split cuda.stf into a standalone cuda-stf package
caugonnet Jul 3, 2026
6402287
[STF] Make cuda-stf standalone; drop hard cuda-cccl dependency
caugonnet Jul 3, 2026
6191f45
Merge branch 'main' into stf_c_api
caugonnet Jul 3, 2026
bf3f3cd
pre-commit hooks
caugonnet Jul 3, 2026
ee08ce0
Merge branch 'main' into stf_c_api
caugonnet Jul 4, 2026
2bf929e
Fix use of `reduce_policy`
davebayer Jul 3, 2026
60f9329
[STF] Revert leftover cuda-cccl changes from the STF split
caugonnet Jul 4, 2026
cd181aa
Merge branch 'main' into stf_c_api
caugonnet Jul 4, 2026
9a015d4
Merge branch 'main' into stf_c_api
caugonnet Jul 8, 2026
3f46ed3
[STF] Reject cross-context waits in Python
caugonnet Jul 8, 2026
3862573
[STF] Reject noncontiguous CAI inputs
caugonnet Jul 8, 2026
a0bfbf7
Apply suggestion from @Jacobfaib
caugonnet Jul 8, 2026
f0f5504
[STF] Fix standalone Python documentation
caugonnet Jul 8, 2026
79f8817
Merge branch 'main' into stf_c_api
caugonnet Jul 9, 2026
be563bf
[STF] Add exec places from externally-owned CUDA contexts
caugonnet Jul 10, 2026
b19c931
[STF] Python: exec_place.from_context and cuda.core-backed green_plac…
caugonnet Jul 10, 2026
9a78a9f
[STF] Reject a null CUcontext in exec_place::cuda_context
caugonnet Jul 10, 2026
82c264f
[STF] Remove PR reference from CODEOWNERS comment
caugonnet Jul 10, 2026
8ceb5bb
Merge branch 'main' into stf_c_api
caugonnet Jul 13, 2026
77b1239
Merge branch 'main' into stf_c_api
caugonnet Jul 15, 2026
9ee10c4
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Jul 15, 2026
f136e94
Merge branch 'main' into stf_c_api
caugonnet Jul 15, 2026
c5add2b
[cuda.stf] Simplify Python CMake configuration
caugonnet Jul 16, 2026
5e2f4d5
Merge branch 'main' into stf_c_api
caugonnet Jul 16, 2026
8eca120
[cuda.stf] Remove historical package commentary
caugonnet Jul 16, 2026
d10c312
Merge branch 'main' into stf_c_api
caugonnet Jul 17, 2026
dd39a9b
cudax/stf (python): resolve PR 5315 review findings
caugonnet Jul 17, 2026
a773057
cudax/stf (python): defer async_resources release for caller-stream c…
caugonnet Jul 17, 2026
13ef970
cudax/stf (python): reject imported CAI buffers that carry a producer…
caugonnet Jul 17, 2026
f101d43
cudax/stf (python): update tests for CAI stream=None and driver-based…
caugonnet Jul 17, 2026
accc384
cudax/stf (python): address CodeRabbit review findings
caugonnet Jul 17, 2026
407e646
Merge branch 'main' into stf_c_api
caugonnet Jul 18, 2026
b9b1254
Merge branch 'main' into stf_c_api
caugonnet Jul 19, 2026
be61301
[STF] Support compound while-loop conditions in the C API and Python …
caugonnet Jul 19, 2026
1b291c4
[STF] Use compound while conditions in the Python examples
caugonnet Jul 19, 2026
126896b
[STF] Document compound while conditions in the Python API reference
caugonnet Jul 19, 2026
f32ff62
[STF] Add a device-side loops section to the Python STF guide
caugonnet Jul 19, 2026
0bbdd60
[STF] Be honest about cond_handle usability from Python
caugonnet Jul 19, 2026
1a7d3a4
[STF] Harden stackable logical_data registration from Python buffers
caugonnet Jul 19, 2026
2f41158
[STF] Preserve body-exception precedence in numba_task cleanup
caugonnet Jul 19, 2026
4610a32
[STF] Validate results by default in the cholesky and potri examples
caugonnet Jul 19, 2026
e739557
[STF] Synchronize the CAI producer stream at registration
caugonnet Jul 19, 2026
61e7d3f
[STF] Note that the cuda_kernel doc snippet is an excerpt
caugonnet Jul 19, 2026
93918dc
[STF] Note that the numba_task doc snippet is an excerpt
caugonnet Jul 19, 2026
cbceed3
[STF] Apply review nitpicks in Python tests
caugonnet Jul 19, 2026
b8ea935
[STF] Apply review nitpicks in Python examples and bindings
caugonnet Jul 19, 2026
23d1b57
[STF] Resolve the stream pointer before pinning primary contexts
caugonnet Jul 19, 2026
9ef5687
[STF] Point pytorch_task and jit doc snippets at their complete tests
caugonnet Jul 20, 2026
64db026
[STF] Point the while_loop doc snippet at the complete cg.py solver
caugonnet Jul 20, 2026
3e8b3fa
Merge branch 'main' into stf_c_api
caugonnet Jul 20, 2026
a4032b0
Merge branch 'main' into stf_c_api
caugonnet Jul 20, 2026
8dc1432
[STF] Fix stale docstring in graph_scope while_loop test
caugonnet Jul 20, 2026
4e3d6f4
[STF] Preload cudart before importing the compiled bindings
caugonnet Jul 21, 2026
60cd8e5
[STF] Route the CAI producer-stream sync through cuda.bindings
caugonnet Jul 21, 2026
de7befe
[STF] Drop PR-history references from binding comments
caugonnet Jul 21, 2026
c0b8626
Merge branch 'main' into stf_c_api
caugonnet Jul 22, 2026
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 .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ nvbench_helper/ @nvidia/cccl-infra-codeowners
**/cmake/ @nvidia/cccl-cmake-codeowners
# make an exception for the cudax test cmake file
cudax/test/CMakeLists.txt @nvidia/cccl-cudax-codeowners
# make an exception for STF test cmake files, following the PR #5406 cudax test precedent
# make an exception for STF test cmake files

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of #9782

cudax/test/stf/CMakeLists.txt @nvidia/cccl-cudax-codeowners
cudax/test/stf/static_error_checks/CMakeLists.txt @nvidia/cccl-cudax-codeowners

Expand Down
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ Supported versions: `3.10`, `3.11`, `3.12`, `3.13`

* **cuda.compute** — Device-level algorithms, iterators, custom GPU types
* **cuda.coop._experimental** — Block/warp-level primitives for Numba CUDA
* **cuda.stf._experimental** — Sequential Task Flow (CUDASTF) Python bindings in the `cuda-stf` package (Linux only)
* **cuda.cccl.headers** — Programmatic access to headers

### Installation
Expand Down Expand Up @@ -262,14 +263,16 @@ include_paths = headers.get_include_paths()
./ci/test_cuda_coop_python.sh -py-version 3.10
./ci/test_cuda_cccl_headers_python.sh -py-version 3.10
./ci/test_cuda_cccl_examples_python.sh -py-version 3.10
./ci/test_cuda_stf_python.sh -py-version 3.10 # Linux only
```

Test organization:

* `tests/compute` — Algorithms and iterators
* `tests/coop` — Cooperative primitives
* `tests/headers` — Header integration
* `test_examples.py` — Runs compute/coop examples
* `python/cuda_stf/tests/stf` — Sequential Task Flow (separate `cuda-stf` package, Linux only)
* `test_examples.py` — Runs compute/coop examples (STF examples live in `python/cuda_stf/tests/test_examples.py`)

---

Expand Down
45 changes: 45 additions & 0 deletions c/experimental/stf/include/cccl/c/experimental/stf/stf.h
Comment thread
caugonnet marked this conversation as resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to #9705

Original file line number Diff line number Diff line change
Expand Up @@ -2050,6 +2050,51 @@ void stf_stackable_while_cond_scalar(
double threshold,
stf_dtype dtype);

//! \brief Maximum number of terms accepted by \c stf_stackable_while_cond_multi().
# define STF_WHILE_COND_MAX_TERMS 8

//! \brief Combiner for multi-term while conditions.
typedef enum stf_cond_combiner

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be extracted as as standalone PR (C combined conditions)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracted in #10006

{
STF_COND_ALL = 0, //!< Continue while every term holds (logical AND)
STF_COND_ANY = 1, //!< Continue while at least one term holds (logical OR)
} stf_cond_combiner;

//! \brief One comparison term of a multi-term while condition.
//!
//! Evaluates as ``(*ld <op> threshold)``, then negated if \c negate is nonzero.
typedef struct stf_while_cond_term
{
stf_logical_data_handle ld; //!< Scalar logical data (1 element of \c dtype)
stf_compare_op op; //!< Comparison operator
double threshold; //!< Right-hand side compared against the scalar
stf_dtype dtype; //!< Element type of \c ld
int negate; //!< Nonzero to negate the term result
} stf_while_cond_term;

//! \brief Set a compound while-loop condition combining several scalar comparisons.
//!
//! Schedules a single internal task that reads every referenced scalar
//! logical data, evaluates each ``(*ld <op> threshold)`` term (with optional
//! negation) and folds the results with the requested combiner: continue
//! while *all* terms hold (\c STF_COND_ALL) or while *any* term holds
//! (\c STF_COND_ANY). Call exactly once per iteration after the loop body
//! tasks of the current scope.
//!
//! With \p n_terms == 1 this is equivalent to \c stf_stackable_while_cond_scalar().
//!
//! \param ctx Stackable context handle
//! \param scope While scope handle
//! \param terms Array of \p n_terms comparison terms
//! \param n_terms Number of terms (1 to \c STF_WHILE_COND_MAX_TERMS)
//! \param combiner How the term results are combined
void stf_stackable_while_cond_multi(
stf_ctx_handle ctx,
stf_while_scope_handle scope,
const stf_while_cond_term* terms,
int n_terms,
stf_cond_combiner combiner);

#endif // CUDART_VERSION >= 12040

//! \brief Create stackable logical data from existing memory and a data place.
Expand Down
197 changes: 135 additions & 62 deletions c/experimental/stf/src/stf.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1279,33 +1279,77 @@ decltype(auto) visit_sld(stf_logical_data_handle h, F&& f)
}

#if _CCCL_CTK_AT_LEAST(12, 4)
// Built-in condition kernel for while_cond_scalar. Reads the head of the
// scalar logical data, applies the requested comparison and updates the
// conditional handle in place. Lives outside extern "C" because it is a
// device kernel template.
template <typename T>
__global__ void
stf_stackable_while_cond_kernel(const T* value, cudaGraphConditionalHandle handle, double threshold, int op)
{
const double v = static_cast<double>(*value);
bool result;
switch (op)
// Built-in condition kernel for while_cond_scalar / while_cond_multi. Reads
// the head scalar of each referenced logical data, applies the requested
// comparison (optionally negated), folds the term results with the requested
// combiner and updates the conditional handle in place. The whole term pack
// is passed by value through kernel parameters (at most
// STF_WHILE_COND_MAX_TERMS entries, well under the parameter-space limit) so
// no device allocation is needed. Lives outside extern "C" because it is a
// device kernel.
struct stf_while_cond_term_dev
{
const void* ptr;
double threshold;
int op;
int dtype;
int negate;
};

struct stf_while_cond_pack
{
stf_while_cond_term_dev terms[STF_WHILE_COND_MAX_TERMS];
int n_terms;
int combiner;
};

__global__ void stf_stackable_while_cond_kernel(stf_while_cond_pack pack, cudaGraphConditionalHandle handle)
{
bool result = (pack.combiner == STF_COND_ALL);
for (int i = 0; i < pack.n_terms; ++i)
{
case STF_CMP_GT:
result = v > threshold;
break;
case STF_CMP_LT:
result = v < threshold;
break;
case STF_CMP_GE:
result = v >= threshold;
break;
case STF_CMP_LE:
result = v <= threshold;
break;
default:
result = false;
break;
const stf_while_cond_term_dev& t = pack.terms[i];
double v = 0.0;
switch (t.dtype)
{
case STF_DTYPE_FLOAT32:
v = static_cast<double>(*static_cast<const float*>(t.ptr));
break;
case STF_DTYPE_FLOAT64:
v = *static_cast<const double*>(t.ptr);
break;
case STF_DTYPE_INT32:
v = static_cast<double>(*static_cast<const int*>(t.ptr));
break;
case STF_DTYPE_INT64:
v = static_cast<double>(*static_cast<const long long*>(t.ptr));
break;
default:
break;
}
bool term = false;
switch (t.op)
{
case STF_CMP_GT:
term = v > t.threshold;
break;
case STF_CMP_LT:
term = v < t.threshold;
break;
case STF_CMP_GE:
term = v >= t.threshold;
break;
case STF_CMP_LE:
term = v <= t.threshold;
break;
default:
break;
}
if (t.negate)
{
term = !term;
}
result = (pack.combiner == STF_COND_ALL) ? (result && term) : (result || term);
}
cudaGraphSetConditional(handle, result ? 1 : 0);
}
Expand Down Expand Up @@ -1520,62 +1564,91 @@ void stf_stackable_while_cond_scalar(
stf_compare_op op,
double threshold,
stf_dtype dtype)
{
stf_while_cond_term term{ld, op, threshold, dtype, /* negate */ 0};
stf_stackable_while_cond_multi(ctx, scope, &term, 1, STF_COND_ALL);
}

void stf_stackable_while_cond_multi(
stf_ctx_handle ctx,
stf_while_scope_handle scope,
const stf_while_cond_term* terms,
int n_terms,
stf_cond_combiner combiner)
{
_CCCL_ASSERT(ctx != nullptr, "stackable context handle must not be null");
_CCCL_ASSERT(scope != nullptr, "while scope handle must not be null");
_CCCL_ASSERT(ld != nullptr, "stackable logical data handle must not be null");
_CCCL_ASSERT(terms != nullptr, "condition terms must not be null");
_CCCL_ASSERT(n_terms >= 1 && n_terms <= STF_WHILE_COND_MAX_TERMS, "invalid number of condition terms");
_CCCL_ASSERT(combiner == STF_COND_ALL || combiner == STF_COND_ANY, "invalid condition combiner");

auto* sctx = from_opaque_sctx(ctx);
auto* guard = from_opaque_while(scope);
cudaGraphConditionalHandle cond_handle = guard->cond_handle();

const int offset = sctx->get_head_offset();

// Validate (and auto-push if necessary) the read access on this scope,
// then materialise the untyped logical_data for the task dep. The
// concrete stackable_logical_data<T> is dispatched through visit_sld()
// so both slice<char>-backed data and void_interface tokens resolve
// correctly; the while-condition kernel below only makes sense on a
// scalar-typed slice, but validate_access/get_ld are type-agnostic.
logical_data_untyped ld_ut = visit_sld(ld, [&](auto& sld) {
sld.validate_access(offset, *sctx, access_mode::read);
return logical_data_untyped{sld.get_ld(offset)};
});

auto& underlying_ctx = sctx->get_ctx(offset);
auto task = underlying_ctx.task();
task.add_deps(task_dep_untyped(ld_ut, access_mode::read));

// Validate (and auto-push if necessary) the read access of every term on
// this scope, then materialise the untyped logical_data for the task dep.
// The concrete stackable_logical_data<T> is dispatched through visit_sld()
// so both slice<char>-backed data and void_interface tokens resolve
// correctly; the while-condition kernel below only makes sense on
// scalar-typed slices, but validate_access/get_ld are type-agnostic.
// Duplicate handles share a single read dependency (dep_index remembers
// which task-dep slot each term resolves to).
int dep_index[STF_WHILE_COND_MAX_TERMS];
int n_deps = 0;
for (int i = 0; i < n_terms; ++i)
{
_CCCL_ASSERT(terms[i].ld != nullptr, "stackable logical data handle must not be null");
_CCCL_ASSERT(terms[i].dtype >= STF_DTYPE_FLOAT32 && terms[i].dtype <= STF_DTYPE_INT64,
"unsupported dtype for stf_stackable_while_cond_multi");
int found = -1;
for (int j = 0; j < i; ++j)
{
if (terms[j].ld == terms[i].ld)
{
found = dep_index[j];
break;
}
}
if (found >= 0)
{
dep_index[i] = found;
continue;
}
logical_data_untyped ld_ut = visit_sld(terms[i].ld, [&](auto& sld) {
sld.validate_access(offset, *sctx, access_mode::read);
return logical_data_untyped{sld.get_ld(offset)};
});
task.add_deps(task_dep_untyped(ld_ut, access_mode::read));
dep_index[i] = n_deps++;
}

task.set_symbol("while_condition");
task.enable_capture();
task.start();

auto stream = task.get_stream();
auto s = task.template get<slice<const char>>(0);
const void* ptr = s.data_handle();
auto stream = task.get_stream();

switch (dtype)
stf_while_cond_pack pack{};
pack.n_terms = n_terms;
pack.combiner = static_cast<int>(combiner);
for (int i = 0; i < n_terms; ++i)
{
case STF_DTYPE_FLOAT32:
stf_stackable_while_cond_kernel<float>
<<<1, 1, 0, stream>>>(static_cast<const float*>(ptr), cond_handle, threshold, op);
break;
case STF_DTYPE_FLOAT64:
stf_stackable_while_cond_kernel<double>
<<<1, 1, 0, stream>>>(static_cast<const double*>(ptr), cond_handle, threshold, op);
break;
case STF_DTYPE_INT32:
stf_stackable_while_cond_kernel<int>
<<<1, 1, 0, stream>>>(static_cast<const int*>(ptr), cond_handle, threshold, op);
break;
case STF_DTYPE_INT64:
stf_stackable_while_cond_kernel<long long>
<<<1, 1, 0, stream>>>(static_cast<const long long*>(ptr), cond_handle, threshold, op);
break;
default:
_CCCL_ASSERT(false, "unsupported dtype for stf_stackable_while_cond_scalar");
break;
auto s = task.template get<slice<const char>>(dep_index[i]);
pack.terms[i].ptr = s.data_handle();
pack.terms[i].threshold = terms[i].threshold;
pack.terms[i].op = static_cast<int>(terms[i].op);
pack.terms[i].dtype = static_cast<int>(terms[i].dtype);
pack.terms[i].negate = terms[i].negate;
}

stf_stackable_while_cond_kernel<<<1, 1, 0, stream>>>(pack, cond_handle);

task.end();
}

Expand Down
Loading