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
7 changes: 7 additions & 0 deletions .github/actions/workflow-build/build-workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,13 @@ def set_derived_tags(matrix_job):
matrix_job["jobs"].remove(original_job)
matrix_job["jobs"] += expanded_jobs

# Apply project-specific job exclusions (e.g. skip_jobs_on_windows when cxx is MSVC)
skip_on_windows = project.get("skip_jobs_on_windows")
if skip_on_windows and "cxx" in matrix_job and is_windows(matrix_job):
for job in skip_on_windows:
if job in matrix_job["jobs"]:
matrix_job["jobs"].remove(job)
Comment thread
caugonnet marked this conversation as resolved.
Outdated


def next_explode_tag(matrix_job):
non_exploded_tags = ["jobs"]
Expand Down
2 changes: 1 addition & 1 deletion c/experimental/stf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.21)

project(CCCL_C_EXPERIMENTAL_STF LANGUAGES CUDA CXX C)

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.

are we sure ?

project(CCCL_C_EXPERIMENTAL_STF LANGUAGES CUDA CXX)

option(
CCCL_C_EXPERIMENTAL_STF_ENABLE_TESTING
Expand Down
67 changes: 59 additions & 8 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 @@ -456,36 +456,87 @@ cudaStream_t stf_fence(stf_ctx_handle ctx);
//!
//! \brief Create logical data from existing memory buffer
//!
//! Creates logical data handle from an existing host memory buffer.
//! STF takes ownership of data management during task execution.
//! Creates logical data handle from existing memory buffer, assuming host data place.
//! This is a convenience wrapper around stf_logical_data_with_place() with host placement.
//!
//! \param ctx Context handle
//! \param[out] ld Pointer to receive logical data handle
//! \param addr Pointer to existing data buffer
//! \param addr Pointer to existing data buffer (assumed to be host memory)
//! \param sz Size of data in bytes
//!
//! \pre ctx must be valid context handle
//! \pre ld must not be NULL
//! \pre addr must not be NULL
//! \pre addr must not be NULL and point to host-accessible memory
//! \pre sz must be greater than 0
//! \post *ld contains valid logical data handle
//!
//! \note Original data pointer should not be accessed during task execution
//! \note Data will be written back when logical data is destroyed or context finalized
//! \note This function assumes host memory. For device/managed memory, use stf_logical_data_with_place()
//! \note Equivalent to: stf_logical_data_with_place(ctx, ld, addr, sz, make_host_data_place())
//!
//! \par Example:
//! \code
//! float data[1024];
//! stf_logical_data_handle ld;
//! stf_logical_data(ctx, &ld, data, sizeof(data));
//! stf_logical_data(ctx, &ld, data, sizeof(data)); // Assumes host memory
//! // ... use in tasks ...
//! stf_logical_data_destroy(ld);
//! \endcode
//!
//! \see stf_logical_data_empty(), stf_logical_data_destroy()
//! \see stf_logical_data_with_place(), stf_logical_data_empty(), stf_logical_data_destroy()

void stf_logical_data(stf_ctx_handle ctx, stf_logical_data_handle* ld, void* addr, size_t sz);

//!
//! \brief Create logical data handle from address with data place specification
//!
//! Creates logical data handle from existing memory buffer, explicitly specifying where
//! the memory is located (host, device, managed, etc.). This is the primary and recommended
//! logical data creation function as it provides STF with essential memory location information
//! for optimal data movement and placement strategies.
//!
//! \param ctx Context handle
//! \param[out] ld Pointer to receive logical data handle
//! \param addr Pointer to existing memory buffer
//! \param sz Size of buffer in bytes
//! \param dplace Data place specifying memory location
//!
//! \pre ctx must be valid context handle
//! \pre ld must be valid pointer to logical data handle pointer
//! \pre addr must point to valid memory of at least sz bytes
//! \pre sz must be greater than 0
//! \pre dplace must be valid data place (not invalid)
//!
//! \post *ld contains valid logical data handle on success
//! \post Caller owns returned handle (must call stf_logical_data_destroy())
//!
//! \par Examples:
//! \code
//! // GPU device memory (recommended for CUDA arrays)
//! float* device_ptr;
//! cudaMalloc(&device_ptr, 1000 * sizeof(float));
//! stf_data_place dplace = make_device_data_place(0);
//! stf_logical_data_handle ld;
//! stf_logical_data_with_place(ctx, &ld, device_ptr, 1000 * sizeof(float), dplace);
//!
//! // Host memory
//! float* host_data = new float[1000];
//! stf_data_place host_place = make_host_data_place();
//! stf_logical_data_handle ld_host;
//! stf_logical_data_with_place(ctx, &ld_host, host_data, 1000 * sizeof(float), host_place);
//!
//! // Managed memory
//! float* managed_ptr;
//! cudaMallocManaged(&managed_ptr, 1000 * sizeof(float));
//! stf_data_place managed_place = make_managed_data_place();
//! stf_logical_data_handle ld_managed;
//! stf_logical_data_with_place(ctx, &ld_managed, managed_ptr, 1000 * sizeof(float), managed_place);
//! \endcode
//!
//! \see make_device_data_place(), make_host_data_place(), make_managed_data_place()

void stf_logical_data_with_place(
stf_ctx_handle ctx, stf_logical_data_handle* ld, void* addr, size_t sz, stf_data_place dplace);

//!
//! \brief Set symbolic name for logical data
//!
Expand Down
34 changes: 33 additions & 1 deletion c/experimental/stf/src/stf.cu
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,44 @@ cudaStream_t stf_fence(stf_ctx_handle ctx)
}

void stf_logical_data(stf_ctx_handle ctx, stf_logical_data_handle* ld, void* addr, size_t sz)
{
// Convenience wrapper: assume host memory
stf_logical_data_with_place(ctx, ld, addr, sz, make_host_data_place());
}

void stf_logical_data_with_place(
stf_ctx_handle ctx, stf_logical_data_handle* ld, void* addr, size_t sz, stf_data_place dplace)
{
assert(ctx);
assert(ld);

auto* context_ptr = static_cast<context*>(ctx);
auto ld_typed = context_ptr->logical_data(make_slice((char*) addr, sz));

// Convert C data_place to C++ data_place
cuda::experimental::stf::data_place cpp_dplace;
switch (dplace.kind)
{
case STF_DATA_PLACE_HOST:
cpp_dplace = cuda::experimental::stf::data_place::host();
break;
case STF_DATA_PLACE_DEVICE:
cpp_dplace = cuda::experimental::stf::data_place::device(dplace.u.device.dev_id);
break;
case STF_DATA_PLACE_MANAGED:
cpp_dplace = cuda::experimental::stf::data_place::managed();
break;
case STF_DATA_PLACE_AFFINE:
cpp_dplace = cuda::experimental::stf::data_place::affine();
break;
default:
// Invalid data place - this should not happen with valid input
assert(false && "Invalid data_place kind");
cpp_dplace = cuda::experimental::stf::data_place::host(); // fallback
break;
}

// Create logical data with the specified data place
auto ld_typed = context_ptr->logical_data(make_slice((char*) addr, sz), cpp_dplace);

// Store the logical_data_untyped directly as opaque pointer
*ld = new logical_data_untyped{ld_typed};
Expand Down
3 changes: 2 additions & 1 deletion ci/build_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";

# Script defaults
VERBOSE=${VERBOSE:-}
HOST_COMPILER=${CXX:-g++} # $CXX if set, otherwise `g++`
# Prefer CUDAHOSTCXX when set (e.g. cross-compilation) so -cmake-options and env agree
Comment thread
caugonnet marked this conversation as resolved.
Outdated
HOST_COMPILER=${CUDAHOSTCXX:-${CXX:-g++}}
CXX_STANDARD=17
CUDA_COMPILER=${CUDACXX:-nvcc} # $CUDACXX if set, otherwise `nvcc`
CUDA_ARCHS= # Empty, use presets by default.
Expand Down
5 changes: 4 additions & 1 deletion ci/matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ jobs:
test_py_coop: { name: "Test cuda.coop", gpu: true, needs: 'build_py_wheel', force_producer_ctk: "pybuild", invoke: { prefix: 'test_cuda_coop'} }
test_py_par: { name: "Test cuda.compute", gpu: true, needs: 'build_py_wheel', force_producer_ctk: "pybuild", invoke: { prefix: 'test_cuda_compute'} }
test_py_examples: { name: "Test cuda.cccl.examples", gpu: true, needs: 'build_py_wheel', force_producer_ctk: "pybuild", invoke: { prefix: 'test_cuda_cccl_examples'} }
test_py_stf: { name: "Test cuda.stf", gpu: true, needs: 'build_py_wheel', force_producer_ctk: "pybuild", invoke: { prefix: 'test_cuda_stf'} }

# Run jobs for 'target' project (ci/util/build_and_test_targets.sh):
run_cpu: { gpu: false }
Expand Down Expand Up @@ -524,7 +525,9 @@ projects:
name: "Python"
job_map:
build: ['build_py_wheel']
test: ['test_py_headers', 'test_py_coop', 'test_py_par', 'test_py_examples']
test: ['test_py_headers', 'test_py_coop', 'test_py_par', 'test_py_examples', 'test_py_stf']
# STF C API and Python bindings are not built for MSVC
skip_jobs_on_windows: ['test_py_stf']
Comment thread
caugonnet marked this conversation as resolved.
Outdated
cccl_c_parallel:
name: 'CCCL C Parallel'
stds: [20]
Expand Down
30 changes: 30 additions & 0 deletions ci/test_cuda_stf_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -euo pipefail

ci_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$ci_dir/pyenv_helper.sh"

# Parse common arguments
source "$ci_dir/util/python/common_arg_parser.sh"
parse_python_args "$@"
cuda_major_version=$(nvcc --version | grep release | awk '{print $6}' | tr -d ',' | cut -d '.' -f 1 | cut -d 'V' -f 2)

# Setup Python environment
setup_python_env "${py_version}"

# Fetch or build the cuda_cccl wheel:
if [[ -n "${GITHUB_ACTIONS:-}" ]]; then
wheel_artifact_name=$("$ci_dir/util/workflow/get_wheel_artifact_name.sh")
"$ci_dir/util/artifacts/download.sh" ${wheel_artifact_name} /home/coder/cccl/
else
"$ci_dir/build_cuda_cccl_python.sh" -py-version "${py_version}"
fi

# Install cuda_cccl
CUDA_CCCL_WHEEL_PATH="$(ls /home/coder/cccl/wheelhouse/cuda_cccl-*.whl)"
python -m pip install "${CUDA_CCCL_WHEEL_PATH}[test-cu${cuda_major_version}]"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

# Run tests for STF module
cd "/home/coder/cccl/python/cuda_cccl/tests/"
python -m pytest -n auto -v stf/
4 changes: 4 additions & 0 deletions cudax/examples/stf/void_data_interface.cu

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 changes to #7972

Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,9 @@ int main()
return cuda_kernel_desc{dummy_kernel, 16, 128, 0};
};

EXPECT(token.is_void_interface());
EXPECT(token2.is_void_interface());
EXPECT(token3.is_void_interface());

ctx.finalize();
}
3 changes: 2 additions & 1 deletion cudax/test/stf/cpp/task_get_stream.cu

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 #7972

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ void test_stream()
context ctx;

auto token = ctx.token();
auto t = ctx.task(token.write());
EXPECT(token.is_void_interface());
auto t = ctx.task(token.write());
t.start();
cudaStream_t s = t.get_stream();
EXPECT(s != nullptr);
Expand Down
97 changes: 96 additions & 1 deletion python/cuda_cccl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,34 @@ message(

# Build cccl.c.parallel and add CCCL's install rules
set(_cccl_root ../..)

# Build and install C++ library first
Comment thread
caugonnet marked this conversation as resolved.
Outdated
set(CCCL_TOPLEVEL_PROJECT ON) # Enable the developer builds
set(CCCL_ENABLE_C_PARALLEL ON) # Build the cccl.c.parallel library
# STF C interface and Python bindings are not compatible with MSVC; disable on Windows.
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CCCL_ENABLE_C_EXPERIMENTAL_STF OFF)
message(STATUS "STF disabled: not compatible with MSVC")
else()
set(CCCL_ENABLE_C_EXPERIMENTAL_STF ON)
endif()
set(CCCL_ENABLE_UNSTABLE ON) # Enable unstable features
Comment thread
caugonnet marked this conversation as resolved.
Outdated

# Disable all testing, examples, and benchmarks - we only want the libraries
set(CCCL_ENABLE_TESTING OFF)
set(CCCL_ENABLE_EXAMPLES OFF)
set(CCCL_ENABLE_BENCHMARKS OFF)
set(CCCL_C_PARALLEL_ENABLE_TESTING OFF)
set(CCCL_C_EXPERIMENTAL_STF_ENABLE_TESTING OFF)
# Note: CCCL_ENABLE_CUDAX must be ON because STF depends on it (via CCCL_ENABLE_UNSTABLE)
# But disable cudax tests, examples, and header testing
set(cudax_ENABLE_TESTING OFF)
set(cudax_ENABLE_EXAMPLES OFF)
set(cudax_ENABLE_HEADER_TESTING OFF)
set(cudax_ENABLE_CUFILE OFF)
set(CCCL_C_PARALLEL_LIBRARY_OUTPUT_DIRECTORY ${SKBUILD_PROJECT_NAME})
set(CCCL_C_EXPERIMENTAL_STF_LIBRARY_OUTPUT_DIRECTORY ${SKBUILD_PROJECT_NAME})

# Just install the rest:
set(libcudacxx_ENABLE_INSTALL_RULES ON)
set(CUB_ENABLE_INSTALL_RULES ON)
Expand All @@ -34,10 +59,29 @@ add_subdirectory(${_cccl_root} _parent_cccl)
set(CMAKE_INSTALL_LIBDIR "${old_libdir}") # pop
set(CMAKE_INSTALL_INCLUDEDIR "${old_includedir}") # pop

# ensure the destination directory exists
# Create CCCL::cudax alias for STF (normally created by cccl-config.cmake)
if (
CCCL_ENABLE_C_EXPERIMENTAL_STF
AND TARGET cudax::cudax
AND NOT TARGET CCCL::cudax
)
add_library(CCCL::cudax ALIAS cudax::cudax)
endif()

# Ensure the destination directory exists
file(MAKE_DIRECTORY "cuda/compute/${CUDA_VERSION_DIR}/cccl")
if (CCCL_ENABLE_C_EXPERIMENTAL_STF)
file(MAKE_DIRECTORY "cuda/stf/${CUDA_VERSION_DIR}/cccl")
endif()

# Install version-specific binaries
if (CCCL_ENABLE_C_EXPERIMENTAL_STF)
install(
TARGETS cccl.c.experimental.stf
DESTINATION cuda/stf/${CUDA_VERSION_DIR}/cccl
)
endif()

install(
TARGETS cccl.c.parallel
DESTINATION cuda/compute/${CUDA_VERSION_DIR}/cccl
Expand Down Expand Up @@ -116,6 +160,7 @@ python3_add_library(
WITH_SOABI
"${_generated_extension_src}"
)

add_dependencies(_bindings_impl cythonize_bindings_impl)
target_link_libraries(
_bindings_impl
Expand All @@ -126,3 +171,53 @@ target_link_libraries(
set_target_properties(_bindings_impl PROPERTIES INSTALL_RPATH "$ORIGIN/cccl")

install(TARGETS _bindings_impl DESTINATION cuda/compute/${CUDA_VERSION_DIR})

if (CCCL_ENABLE_C_EXPERIMENTAL_STF)
message(STATUS "STF Using Cython ${CYTHON_VERSION}")
set(
stf_pyx_source_file
"${cuda_cccl_SOURCE_DIR}/cuda/stf/_stf_bindings_impl.pyx"
)
set(
_stf_generated_extension_src
"${cuda_cccl_BINARY_DIR}/_stf_bindings_impl.c"
)
set(_stf_depfile "${cuda_cccl_BINARY_DIR}/_stf_bindings_impl.c.dep")
add_custom_command(
OUTPUT "${_stf_generated_extension_src}"
COMMAND "${Python3_EXECUTABLE}" -m cython
ARGS
${CYTHON_FLAGS_LIST} "${stf_pyx_source_file}" --output-file
${_stf_generated_extension_src}
DEPENDS "${stf_pyx_source_file}"
DEPFILE "${_stf_depfile}"
COMMENT "Cythonizing ${stf_pyx_source_file} for CUDA ${CUDA_VERSION_MAJOR}"
)
set_source_files_properties(
"${_stf_generated_extension_src}"
PROPERTIES GENERATED TRUE
)
add_custom_target(
cythonize_stf_bindings_impl
ALL
DEPENDS "${_stf_generated_extension_src}"
)

python3_add_library(
_stf_bindings_impl
MODULE
WITH_SOABI
"${_stf_generated_extension_src}"
)
add_dependencies(_stf_bindings_impl cythonize_stf_bindings_impl)
target_link_libraries(
_stf_bindings_impl
PRIVATE cccl.c.experimental.stf CUDA::cuda_driver
)
set_target_properties(
_stf_bindings_impl
PROPERTIES INSTALL_RPATH "$ORIGIN/cccl"
)

install(TARGETS _stf_bindings_impl DESTINATION cuda/stf/${CUDA_VERSION_DIR})
endif()
Loading
Loading