Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
809 commits
Select commit Hold shift + click to select a range
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
3cb502e
[places] Implement cyclic_partition::get_executor
caugonnet Jul 11, 2026
39375e0
[places] Add geometry-aware allocation and returnable placement stats
caugonnet Jul 11, 2026
9e46795
[places] Add cute_partition: JAX-like structured tensor partitions
caugonnet Jul 11, 2026
50459da
[places] Test placement facilities and add a partitioned AXPY example
caugonnet Jul 11, 2026
f37c812
[places] Expose per-grid-position bytes in placement statistics
caugonnet Jul 11, 2026
b5e484d
Merge branch 'stf-cyclic-get-executor' into stf-cute-partitions-python
caugonnet Jul 11, 2026
e79a727
Merge branch 'stf-cute-partitions' into stf-cute-partitions-python
caugonnet Jul 11, 2026
90b51dc
[STF] C API for placement evaluation and structured partitions
caugonnet Jul 11, 2026
024b540
[STF] Python: cute_partition, placement_evaluate, shaped allocation
caugonnet Jul 11, 2026
31ddd91
[places] Name the geometry-aware allocation allocate_nd
caugonnet Jul 11, 2026
90cbf9e
Merge branch 'stf-cute-partitions' into stf-cute-partitions-python
caugonnet Jul 11, 2026
298a9b5
[STF] Follow the allocate_nd rename in the C API and Python bindings
caugonnet Jul 11, 2026
11741e0
[places] Implement cyclic_partition::get_executor
caugonnet Jul 11, 2026
2121dfd
[places] Harden placement APIs (review findings)
caugonnet Jul 11, 2026
c28747f
Merge branch 'stf-cute-partitions' into stf-cute-partitions-python
caugonnet Jul 11, 2026
a94b66a
[STF] Harden the placement C API and Python bindings (review findings)
caugonnet Jul 11, 2026
5a28243
[places] Assert nonzero grid extents in cyclic get_executor
caugonnet Jul 12, 2026
55e4d18
Merge branch 'stf-cyclic-get-executor' into stf-cute-partitions-python
caugonnet Jul 12, 2026
5f1e008
[places] Drop the hand-rolled VMM check from the partitioned example
caugonnet Jul 12, 2026
8fd3b35
Merge branch 'stf-cute-partitions' into stf-cute-partitions-python
caugonnet Jul 12, 2026
fbfa714
[places] Use all_devices and per-place launches in the partitioned ex…
caugonnet Jul 12, 2026
2772698
Merge branch 'stf-cute-partitions' into stf-cute-partitions-python
caugonnet Jul 12, 2026
4aba5e3
[places] Skip trailing empty places in the partitioned AXPY loop
caugonnet Jul 12, 2026
1031f93
Merge branch 'stf-cute-partitions' into stf-cute-partitions-python
caugonnet Jul 12, 2026
6f84405
[places] Migrate the Thrust allocator example to allocate_nd
caugonnet Jul 12, 2026
3336fdb
Merge branch 'stf-cute-partitions' into stf-cute-partitions-python
caugonnet Jul 12, 2026
cc7edcc
[places] Store partition leaves in fixed-capacity device-ready arrays
caugonnet Jul 12, 2026
9bc98f7
Merge branch 'stf-cute-partitions' into stf-cute-partitions-python
caugonnet Jul 12, 2026
96182e6
[places] Document structured partitions
caugonnet Jul 13, 2026
73dde1b
[places] Qualify the raw-byte allocate_nd form in the docs
caugonnet Jul 13, 2026
171ed2e
[STF] Include <cmath> in the partitioned_axpy example
caugonnet Jul 13, 2026
838b483
[places] Document that row-major front-ends reverse the whole descrip…
caugonnet Jul 13, 2026
6051d8d
Merge branch 'stf-cute-partitions' into stf-cute-partitions-python
caugonnet Jul 13, 2026
a6bdd68
[STF] Allocate DeviceArray through the extents form
caugonnet Jul 13, 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
7afe2d2
[places] Reject partitions that leave grid places unused
caugonnet Jul 16, 2026
c8ae39d
[STF] Document localized Python tensor allocation
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
219b19d
Merge branch 'main' into stf-cute-partitions-python
caugonnet Jul 17, 2026
5ff5371
[STF] Follow the cute_partition_descriptor rename in the C bindings
caugonnet Jul 17, 2026
ed8ebed
[STF] Make C order the Python placement contract
caugonnet Jul 17, 2026
accc384
cudax/stf (python): address CodeRabbit review findings
caugonnet Jul 17, 2026
9b26213
Merge branch 'stf_c_api' into stf-cute-partitions-python
caugonnet Jul 17, 2026
ebd21c3
[STF] Follow the stf_c_api review changes in the placement surface
caugonnet Jul 17, 2026
cdbb63e
[STF] Give DeviceArray a public C-order shape
caugonnet Jul 17, 2026
f90fd36
[STF] Initialize the CUDA driver lazily in green_places()
caugonnet Jul 17, 2026
407e646
Merge branch 'main' into stf_c_api
caugonnet Jul 18, 2026
c25e425
[STF] Expose closed-form element ownership through the C API and Python
caugonnet Jul 18, 2026
fe97538
[STF] Follow Warp's CaptureMode member naming in the scoped-capture test
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
48d073b
Merge remote-tracking branch 'origin/stf_c_api' into stf-cute-partiti…
caugonnet Jul 21, 2026
411c010
[STF] Preload cudart before importing the compiled bindings
caugonnet Jul 21, 2026
5ade361
Merge remote-tracking branch 'origin/stf_c_api' into stf-cute-partiti…
caugonnet Jul 21, 2026
4e3d6f4
[STF] Preload cudart before importing the compiled bindings
caugonnet Jul 21, 2026
3a6ca62
Merge remote-tracking branch 'origin/stf_c_api' into stf-cute-partiti…
caugonnet Jul 21, 2026
60cd8e5
[STF] Route the CAI producer-stream sync through cuda.bindings
caugonnet Jul 21, 2026
cb988e2
Merge remote-tracking branch 'origin/stf_c_api' into stf-cute-partiti…
caugonnet Jul 21, 2026
de7befe
[STF] Drop PR-history references from binding comments
caugonnet Jul 21, 2026
b0d8e3d
Merge remote-tracking branch 'origin/stf_c_api' into stf-cute-partiti…
caugonnet Jul 21, 2026
c0b8626
Merge branch 'main' into stf_c_api
caugonnet Jul 22, 2026
647c73f
c.parallel: comment out the CTK 13.4 scan static_assert (NVBug 6235538)
caugonnet Jul 25, 2026
2ff5df8
Merge branch 'main' into stf_c_api
caugonnet Jul 28, 2026
5701e24
Merge remote-tracking branch 'origin/stf_c_api' into stf-cute-partiti…
caugonnet Jul 28, 2026
a0b71ec
stf python: localized allocation surface in interop.pytorch
caugonnet Jul 28, 2026
7496320
stf python: DLPack producer on DeviceArray alongside CAI
caugonnet Jul 28, 2026
bdcb2f8
stf python: lifetime tier on the localized-allocation surface (CAI-pi…
caugonnet Jul 28, 2026
1b322da
stf python: DLPack producer on DeviceArray alongside CAI
caugonnet Jul 28, 2026
24b4650
Merge remote-tracking branch 'origin/stf_c_api' into stf_c_api
caugonnet Jul 28, 2026
b3a0068
Merge branch 'main' into stf_c_api
caugonnet Jul 30, 2026
dd848c6
Merge branch 'main' into stf-cute-partitions-python
caugonnet Jul 30, 2026
9552ebc
[STF] data_place::replicated — one copy per grid member, read-only
caugonnet Aug 4, 2026
ca21727
[STF] data_place::replicated v2 — ordinary per-place allocations, no VMM
caugonnet Aug 4, 2026
8b16a58
[STF] Review: replicated place reports members' stream-ordered conjun…
caugonnet Aug 4, 2026
adbdafb
[STF] Replicated place v3: replicas are ordinary instances, resolved …
caugonnet Aug 4, 2026
f1ec827
[STF] Review: validate the replicated factory with a typed exception
caugonnet Aug 4, 2026
90a21e1
[STF] Deferred replicated data place: data_place::replicated()
caugonnet Aug 4, 2026
81563fd
[STF] Test the deferred replicated form through stackable deps
caugonnet Aug 4, 2026
5e7e323
Merge branch 'main' into stf-replicated-data-place
caugonnet Aug 4, 2026
35d4a75
[STF] Test replicated deps through stackable with DISTINCT member places
caugonnet Aug 4, 2026
1f02d5b
Merge remote-tracking branch 'upstream/main' into stf_c_api
caugonnet Aug 4, 2026
d2c3c58
Merge branch 'stf-replicated-data-place' into stf-python-replicated
caugonnet Aug 4, 2026
65d39d5
[STF] Python binding for replicated data places
caugonnet Aug 4, 2026
e2ea38c
[STF] Axis-grouped replication: replicate_over<axes...>
caugonnet Aug 4, 2026
fac8dc1
Address review feedback on replicated data places
caugonnet Aug 4, 2026
b243b75
Merge review fixes from stf-replicated-data-place
caugonnet Aug 4, 2026
bdeae7e
Cover axis-grouped replication on the graph and stackable backends
caugonnet Aug 4, 2026
e1f6b3c
Merge axis-grouped backend coverage
caugonnet Aug 4, 2026
a49e5f1
Run the deferred-form and distinct-member green flavors on the graph …
caugonnet Aug 4, 2026
5431726
Merge graph-backend coverage for deferred/green flavors
caugonnet Aug 4, 2026
c299d8a
Merge branch 'main' into stf-replicated-data-place
caugonnet Aug 4, 2026
3bc541f
Drop unused local in validate_colocation (gcc -Werror=unused-but-set-…
caugonnet Aug 4, 2026
41372dc
Merge branch update (main) into stf-replicated-data-place
caugonnet Aug 4, 2026
34dd205
Merge unused-variable fix + main update
caugonnet Aug 4, 2026
79687be
Merge branch 'main' into stf-replicated-data-place
caugonnet Aug 4, 2026
0291ea8
Unmask executable-graph instantiation errors; waive stackable flavors…
caugonnet Aug 4, 2026
b367289
Merge branch update (main) into stf-replicated-data-place
caugonnet Aug 4, 2026
24a0932
Merge instantiation-error unmasking + stackable waiver
caugonnet Aug 4, 2026
b656fc0
Probe the same-context rule for conditional body graphs, not just mem…
caugonnet Aug 5, 2026
a2e495d
Merge same-context conditional-body probe
caugonnet Aug 5, 2026
4b53a29
Merge branch 'main' into stf-replicated-data-place
caugonnet Aug 5, 2026
d6d4885
Frozen-import member walk: import every replica at stackable push time
caugonnet Aug 5, 2026
95007e6
Merge branch update (main) into stf-replicated-data-place
caugonnet Aug 5, 2026
f9761de
Merge frozen-import member walk + main update
caugonnet Aug 5, 2026
8a02967
[STF] Add locality-domain execution and data places to cudax places
caugonnet Aug 5, 2026
26ba49c
[STF] Add CUDASTF_FAKE_LOCALITY_DOMAINS fake-topology override
caugonnet Aug 5, 2026
555f0c2
Merge branch 'main' into stf-locality-domain-places
caugonnet Aug 5, 2026
c057685
[STF] Document locality domain places
caugonnet Aug 5, 2026
14de898
Merge main (replicated data place merged upstream as #10625)
caugonnet Aug 5, 2026
b2da688
Merge branch 'main' into stf-locality-domain-places
caugonnet Aug 5, 2026
d2a2044
[STF] Make the fake locality-domain topology override strict
caugonnet Aug 5, 2026
29ec29e
Merge branch 'main' into stf_c_api
caugonnet Aug 5, 2026
2db12c1
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Aug 5, 2026
297fb8e
[STF] Fix cuda.stf build errors under warnings-as-errors
caugonnet Aug 5, 2026
ce03e91
Merge branch 'main' into stf-locality-domain-places
caugonnet Aug 5, 2026
7a24158
cudax/places: replace _CCCL_ASSERT with EXPECT for ordinal bounds checks
caugonnet Aug 5, 2026
f8c325b
[STF] Complete the EXPECT conversion for locality domain validation
caugonnet Aug 5, 2026
9e283ea
cudax/places: drop redundant cudaSetDevice in locality-domain allocate
caugonnet Aug 6, 2026
7c092aa
[STF] Address review feedback on locality-domain places (code and tests)
caugonnet Aug 6, 2026
731fc99
[STF] Address review feedback on locality-domain docs
caugonnet Aug 6, 2026
3a46802
[STF] locality_domain_count never reports 0: one whole-device domain …
caugonnet Aug 6, 2026
aa719be
Merge branch 'main' into stf-locality-domain-places
caugonnet Aug 6, 2026
bb8eb30
Merge remote-tracking branch 'upstream/main' into stf_c_api
caugonnet Aug 6, 2026
9d67330
Merge remote-tracking branch 'upstream/main' into stf-cute-partitions…
caugonnet Aug 6, 2026
4cfb704
Merge branch 'stf_c_api' into stf-cute-partitions-python
caugonnet Aug 6, 2026
a437616
[STF] Replication leverage: replicate_over in partition specs, per-me…
caugonnet Aug 6, 2026
f0e6883
[STF] Replicated partition axes materialize per-instance composite al…
caugonnet Aug 6, 2026
651a3b8
[STF] Poster-child tests and docs for mixed blocked+replicated partit…
caugonnet Aug 6, 2026
4fe6cd5
[STF] Test multi-axis replication in partition specs
caugonnet Aug 6, 2026
398cc54
[STF] Normalize away replication over extent-1 grid axes
caugonnet Aug 6, 2026
81bdc35
[STF] Test frozen access to composite places with replicated axes
caugonnet Aug 6, 2026
3e2f2cf
[STF] Document the replication pointer model
caugonnet Aug 6, 2026
941d5d7
Merge branch 'main' into stf-locality-domain-places
caugonnet Aug 6, 2026
630a094
[STF] Clarify that replicated_empty is a primitive, not a weight abst…
caugonnet Aug 6, 2026
9cae97e
[STF] Test the replicated re-broadcast cycle (write -> read -> write …
caugonnet Aug 6, 2026
ec8c122
[STF] replicated_empty: allow placing the canonical copy at a member …
caugonnet Aug 6, 2026
4647068
Merge branch 'main' into stf-locality-domain-places
caugonnet Aug 6, 2026
1fa2946
[STF] localized tensor factory family: zeros/ones/full and *_like var…
caugonnet Aug 7, 2026
05e5bff
[STF] Optional torch.localized convenience namespace
caugonnet Aug 7, 2026
add3f3f
[STF] Drop the "tp" alias from user-facing examples
caugonnet Aug 7, 2026
1460c15
[STF] stf.interop.pytorch resolves lazily from the top-level import
caugonnet Aug 7, 2026
590aace
[STF] README example: make the default spec visible and the placement…
caugonnet Aug 7, 2026
e7104aa
[STF] spec_of/grid_of accessors on the localized surface
caugonnet Aug 7, 2026
4cdd929
[STF] torch.localized.map + the example spectrum for the programming …
caugonnet Aug 7, 2026
f561844
[STF] Fix two tests using the unexported free-function dep form
caugonnet Aug 7, 2026
eedb7db
Merge remote-tracking branch 'origin/stf-locality-domain-places' into…
caugonnet Aug 7, 2026
87e6006
[STF] Python bindings for locality-domain places
caugonnet Aug 7, 2026
50ff606
Merge remote-tracking branch 'origin/stf-cute-partitions-python' into…
caugonnet Aug 7, 2026
d286931
[STF] Drop place-equality asserts: not exposed through the Python bin…
caugonnet Aug 7, 2026
ca7fe84
Merge branch 'stf-locality-domain-python' into x-9892-integration
caugonnet Aug 7, 2026
1f29d10
Merge remote-tracking branch 'origin/stf-cute-partitions-python' into…
caugonnet Aug 7, 2026
32cd38e
[STF] Use public locality-domain terminology in the test docstring
caugonnet Aug 7, 2026
7482014
[STF] Use public locality-domain terminology in the test docstring
caugonnet Aug 7, 2026
340593b
[STF] exec_place_grid.machine(granularity=...): the current-machine grid
caugonnet Aug 7, 2026
3351950
[STF] Run the localized map examples on locality domains too
caugonnet Aug 7, 2026
1d07c2c
Merge remote-tracking branches 'origin/stf-locality-domain-python' an…
caugonnet Aug 7, 2026
3d936ae
[STF] machine() grid test: explicit dep place (bare rw terminates today)
caugonnet Aug 7, 2026
62651bd
Merge remote-tracking branch 'origin/stf-locality-domain-python' into…
caugonnet Aug 7, 2026
67f24ed
[STF] machine() grids carry a default blocked affine
caugonnet Aug 7, 2026
836a6df
Merge remote-tracking branch 'origin/stf-locality-domain-python' into…
caugonnet Aug 7, 2026
413f144
[STF] machine(): typed grid local (cdef attributes are invisible to u…
caugonnet Aug 7, 2026
f2bc263
Merge remote-tracking branch 'origin/stf-locality-domain-python' into…
caugonnet Aug 7, 2026
873575b
[STF] Document the composite-source replicated-broadcast abort; reord…
caugonnet Aug 7, 2026
ff52467
Merge remote-tracking branch 'origin/stf-locality-domain-python' into…
caugonnet Aug 7, 2026
4e9ff21
[STF] machine(): no composite affine on single-place machines
caugonnet Aug 7, 2026
aa766ab
Merge remote-tracking branch 'origin/stf-locality-domain-python' into…
caugonnet Aug 7, 2026
873d0a0
[STF] Consolidate the localization A/B benchmarks
caugonnet Aug 7, 2026
c26308a
Merge remote-tracking branch 'origin/stf-cute-partitions-python' into…
caugonnet Aug 7, 2026
00b0f43
Merge branch 'main' into stf_c_api
caugonnet Aug 7, 2026
00da023
Merge remote-tracking branch 'upstream/main' into stf-locality-domain…
caugonnet Aug 7, 2026
4b49b1d
Merge remote-tracking branch 'upstream/main' into x-9892-integration
caugonnet Aug 7, 2026
80c9c53
Merge branch 'main' into stf_c_api
caugonnet Aug 8, 2026
b1c44db
Merge branch 'stf-locality-domain-python' into stf_c_api
caugonnet Aug 8, 2026
c6b42bf
Merge remote-tracking branch 'refs/remotes/fork/stf_c_api' into stf_c…
caugonnet Aug 8, 2026
11f7e05
Merge branch 'stf_c_api' into x-9892-integration
caugonnet Aug 8, 2026
3f66da4
[STF] Bind execution grid reshape operations
caugonnet Jul 16, 2026
ba26323
[STF] Expect the early grid_dims validation from stf_c_api
caugonnet Jul 17, 2026
3f886f1
[STF] Convert grid reshape and axis collapse to the C-order contract
caugonnet Jul 17, 2026
763a861
[STF] Complete the #9899 fold: C-order dims contract the reshape bind…
caugonnet Aug 8, 2026
3845184
Merge branch 'stf_c_api' into x-9892-integration
caugonnet Aug 8, 2026
57c4e9a
ci: make setup_python_env idempotent (uv venv --clear)
caugonnet Aug 8, 2026
f2dac5a
Merge branch 'stf_c_api' into x-9892-integration
caugonnet Aug 8, 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
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ Supported versions: `3.10`, `3.11`, `3.12`, `3.13`
### Modules

* **cuda.compute** — Device-level algorithms, iterators, custom GPU types
* **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 @@ -255,13 +256,15 @@ include_paths = headers.get_include_paths()
./ci/test_cuda_compute_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/headers` — Header integration
* `test_examples.py` — Runs compute 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
237 changes: 237 additions & 0 deletions c/experimental/stf/include/cccl/c/experimental/stf/stf.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,22 @@ stf_exec_place_handle stf_exec_place_grid_from_devices(const int* device_ids, si
stf_exec_place_handle
stf_exec_place_grid_create(const stf_exec_place_handle* places, size_t count, const stf_dim4* grid_dims);

//! \brief Return a grid with new dimensions and the same linear place order.
//!
//! Every extent in \p grid_dims must be positive and their product must equal
//! the size of \p grid. The returned handle owns an independent grid wrapper;
//! destroying either handle does not invalidate the other.
//! \return A new execution-place handle, or NULL if the dimensions are invalid.
stf_exec_place_handle stf_exec_place_grid_reshape(stf_exec_place_handle grid, const stf_dim4* grid_dims);

//! \brief Collapse a contiguous inclusive range of grid axes.
//!
//! Axes in [\p first_axis, \p last_axis] are replaced by one axis whose
//! extent is their product. Later axes shift left, trailing extents become
//! one, and linear place order is preserved.
//! \return A new execution-place handle, or NULL if the axis range is invalid.
stf_exec_place_handle stf_exec_place_grid_collapse_axes(stf_exec_place_handle grid, size_t first_axis, size_t last_axis);

//! \brief Same as stf_exec_place_destroy (grids are exec_place handles).
void stf_exec_place_grid_destroy(stf_exec_place_handle grid);

Expand Down Expand Up @@ -284,6 +300,42 @@ stf_data_place_handle stf_data_place_current_device(void);
//! \brief Composite partitioned placement over a grid of execution places.
stf_data_place_handle stf_data_place_composite(stf_exec_place_handle grid, stf_get_executor_fn mapper);

//! \brief Number of locality domains of a device. Never 0 for a valid
//! device: without native locality-domain support (pre-13.4 toolkit, or a
//! driver that cannot answer the query) the device reports a single domain
//! covering the whole device. Returns 0 only on error (invalid device;
//! detail on stderr).
uint32_t stf_locality_domain_count(int dev_id);

//! \brief Execution place pinned to one locality domain of a device (the
//! whole device with the fallback backend). Ordinals are identity tokens,
//! validated lazily at use (native backend).
stf_exec_place_handle stf_exec_place_locality_domain(int dev_id, int domain_id);

//! \brief Grid with one execution place per locality domain of \p dev_id
//! (a single whole-device place with the fallback backend).
stf_exec_place_handle stf_exec_place_locality_domain_grid(int dev_id);

//! \brief Data place whose allocations are localized to one locality
//! domain of a device (plain device memory with the fallback backend).
stf_data_place_handle stf_data_place_locality_domain(int dev_id, int domain_id);

//! \brief Replicated placement: one copy of the data in the affine memory of
//! every member of \p grid. Read-only at the place: mutate the data at
//! another place, the next replicated read re-broadcasts.
stf_data_place_handle stf_data_place_replicated(stf_exec_place_handle grid);

//! \brief Deferred replicated placement: replicated over the grid of
//! whichever task the dependency is used with (bound at task acquisition; a
//! scalar execution place degenerates to its affine data place).
stf_data_place_handle stf_data_place_replicated_deferred(void);

//! \brief Whether \p h is a replicated data place (concrete or deferred).
//! Replicated places only support read access; bindings can validate at
//! dependency construction instead of hitting the C++ exception at task
//! creation. Returns 1 if replicated, 0 otherwise.
int stf_data_place_is_replicated(stf_data_place_handle h);

//! \brief Native blocked partition function for a given dimension,
//! usable wherever an stf_get_executor_fn is expected without any FFI
//! callback cost.
Expand Down Expand Up @@ -379,6 +431,191 @@ void* stf_data_place_allocate_nd(

//! \}

//! \defgroup Placement Tensor placement description and evaluation
//! \brief Structured partitions (cute_partition) and placement statistics
//! \{

//! \brief Opaque handle to a structured tensor partition (see
//! stf_cute_partition_create()). Caller owns the handle; release with
//! stf_cute_partition_destroy().
typedef struct stf_cute_partition_opaque_t* stf_cute_partition_handle;

//! \brief Statistics describing how a localized allocation (or a dry-run
//! evaluation of one) distributes a tensor over data places.
//! The estimated fraction of block-local bytes ("accuracy") is
//! matching_samples / total_samples.
typedef struct stf_placement_stats
{
uint64_t total_bytes; //!< requested payload size in bytes
uint64_t vm_bytes; //!< block-rounded virtual reservation size in bytes
uint64_t block_size; //!< placement granularity in bytes
uint64_t nblocks; //!< number of placement blocks
uint64_t nallocs; //!< physical allocations after merging same-owner runs
uint64_t total_samples; //!< probes drawn by the block-owner sampler
uint64_t matching_samples; //!< probes agreeing with the chosen block owner
uint64_t replication_factor; //!< copies of each byte along replicated partition axes (1 = none);
//!< total resident bytes = vm_bytes * replication_factor, and the
//!< bytes_per_grid_index output already counts every copy
} stf_placement_stats;

//! \brief Per-dimension distribution policy (see stf_partition_dim_spec).
typedef enum stf_dim_policy
{
STF_DIM_WHOLE = 0, //!< dimension is not distributed
STF_DIM_BLOCKED = 1, //!< contiguous chunks of ceil(extent / places)
STF_DIM_CYCLIC = 2, //!< round-robin elements
STF_DIM_BLOCK_CYCLIC = 3 //!< round-robin blocks of a given size
} stf_dim_policy;

//! \brief Per-dimension entry of a JAX-like partition specification.
typedef struct stf_partition_dim_spec
{
int policy; //!< an stf_dim_policy value
int mesh_axis; //!< grid axis this dimension distributes over (ignored for STF_DIM_WHOLE)
uint64_t block; //!< block size (STF_DIM_BLOCK_CYCLIC only)
} stf_partition_dim_spec;

//! \brief Evaluate - without allocating - how a localized allocation would
//! distribute a tensor over the places of a grid.
//!
//! Runs the exact same block-owner decision procedure as the allocation path
//! and returns the resulting statistics, so a candidate mapping can be scored
//! (and its parameters tuned) before committing memory.
//!
//! \param grid Grid of execution places (must not be NULL)
//! \param mapper Partition function mapping element coordinates to a place
//! \param data_dims Extents of the tensor (dimension 0 fastest; must not be NULL)
//! \param elemsize Size of one element in bytes
//! \param probes Samples per block for the majority vote (0 = default)
//! \param block_size Placement granularity in bytes; 0 selects the device
//! allocation granularity when a device is present (2 MiB otherwise)
//! \param out_stats Filled with the resulting statistics (must not be NULL)
//! \param bytes_per_grid_index Optional array of one entry per grid position
//! (length = product of the grid dims), filled with the bytes owned by
//! each position; pass NULL to skip
//! \return 0 on success, non-zero on failure (diagnostic on stderr)
int stf_placement_evaluate(
stf_exec_place_handle grid,
stf_get_executor_fn mapper,
const stf_dim4* data_dims,
uint64_t elemsize,
uint64_t probes,
uint64_t block_size,
stf_placement_stats* out_stats,
uint64_t* bytes_per_grid_index);

//! \brief Variant of stf_placement_evaluate() for a structured partition.
//! The tensor extents are the partition's true extents.
int stf_placement_evaluate_partition(
stf_exec_place_handle grid,
stf_cute_partition_handle partition,
uint64_t elemsize,
uint64_t probes,
uint64_t block_size,
stf_placement_stats* out_stats,
uint64_t* bytes_per_grid_index);

//! \brief Build a structured partition from a JAX-like per-dimension
//! specification ("dimension 1, blocked over grid axis 0").
//!
//! Split dimensions are padded up to divisibility so the underlying layout is
//! exact; coordinates beyond the true extents own no bytes (predication).
//!
//! \param true_dims True tensor extents (dimension 0 fastest; must not be NULL)
//! \param grid_dims Extents of the grid of places (must not be NULL)
//! \param spec One entry per tensor dimension (must not be NULL)
//! \param rank Number of entries in \p spec (at most 4)
//! \return New partition handle, or NULL on invalid input
//! \param replicated_axes_mask Bitmask of grid axes holding one copy of their
//! fiber's bytes per coordinate (bit a = native grid axis a; 0 = none). A
//! replicated axis must not be bound by any spec entry.
//! stf_placement_evaluate_partition() reports the per-member copies, and a
//! composite data place built from such a partition is REPLICATED (read-only;
//! stf_data_place_is_replicated() returns 1): through a logical data it
//! resolves to one composite allocation per replicated coordinate. Direct
//! allocation is rejected -- allocate through a logical data, like
//! stf_data_place_replicated().
stf_cute_partition_handle stf_cute_partition_create(
const stf_dim4* true_dims,
const stf_dim4* grid_dims,
const stf_partition_dim_spec* spec,
size_t rank,
uint32_t replicated_axes_mask);

//! \brief Bitmask of replicated grid axes of \p p (native axis numbering)
uint32_t stf_cute_partition_replicated_axes(stf_cute_partition_handle p);

//! \brief Number of copies the replicated axes of \p p imply (1 = none)
uint64_t stf_cute_partition_replication_factor(stf_cute_partition_handle p);

//! \brief Build a structured partition directly from flattened
//! (extent, stride) leaves (expert form; see the C++ cute_partition docs).
//! Strides are in linear element units over the padded extents, dimension 0
//! fastest, leaf 0 fastest within each mode.
//!
//! \return New partition handle, or NULL if the leaves do not tile the padded
//! space exactly
stf_cute_partition_handle stf_cute_partition_from_leaves(
const uint64_t* place_extents,
const int64_t* place_strides,
const int* place_axes,
size_t num_place_leaves,
const uint64_t* local_extents,
const int64_t* local_strides,
size_t num_local_leaves,
const stf_dim4* padded_dims,
const stf_dim4* true_dims,
const stf_dim4* grid_dims);

//! \brief Destroy a partition handle (NULL is ignored).
void stf_cute_partition_destroy(stf_cute_partition_handle h);

//! \brief Get the true tensor extents of a partition.
void stf_cute_partition_true_dims(stf_cute_partition_handle h, stf_dim4* out_dims);

//! \brief Get the padded tensor extents of a partition.
void stf_cute_partition_padded_dims(stf_cute_partition_handle h, stf_dim4* out_dims);

//! \brief Get the grid extents of a partition.
void stf_cute_partition_grid_dims(stf_cute_partition_handle h, stf_dim4* out_dims);

//! \brief Number of leaves in the place mode.
size_t stf_cute_partition_num_place_leaves(stf_cute_partition_handle h);

//! \brief Number of leaves in the local mode.
size_t stf_cute_partition_num_local_leaves(stf_cute_partition_handle h);

//! \brief Fill the place-mode leaves (arrays sized by
//! stf_cute_partition_num_place_leaves(); any output may be NULL to skip).
void stf_cute_partition_get_place_leaves(stf_cute_partition_handle h, uint64_t* extents, int64_t* strides, int* axes);

//! \brief Fill the local-mode leaves (arrays sized by
//! stf_cute_partition_num_local_leaves(); any output may be NULL to skip).
void stf_cute_partition_get_local_leaves(stf_cute_partition_handle h, uint64_t* extents, int64_t* strides);

//! \brief Linear element offset (in the padded space) of a place's first
//! element, given the place's linear index in place-mode order.
//! Returns UINT64_MAX (with a diagnostic on stderr) if the index is out of
//! range.
uint64_t stf_cute_partition_place_offset(stf_cute_partition_handle h, uint64_t place_index);

//! \brief Grid position owning the element at the given data coordinates
//! (closed-form; coordinates must be within the padded extents).
//! Returns nonzero on failure (with a diagnostic on stderr).
int stf_cute_partition_owner(stf_cute_partition_handle h, const stf_pos4* data_coords, stf_pos4* out_grid_pos);

//! \brief Create a composite data place backed by a structured partition.
//!
//! Such a place is specific to one tensor (the partition's true extents):
//! allocate with stf_data_place_allocate_nd() using those extents.
//!
//! \param grid Grid of execution places (must not be NULL)
//! \param partition Structured partition (must not be NULL; copied)
//! \return New data place handle, or NULL on failure
stf_data_place_handle stf_data_place_composite_cute(stf_exec_place_handle grid, stf_cute_partition_handle partition);

//! \}

//! \defgroup Handles Opaque Handles
//! \brief Opaque handle types for STF objects
//! \{
Expand Down
Loading