Skip to content

[cuda.coop.tile] Add standalone Tile primitives for Python and C++ - #12564

Draft
tpn wants to merge 13 commits into
NVIDIA:codex/cuda-coop-tile-base-20261109from
tpn:codex/cuda-coop-tile-standalone-20261109
Draft

tpn wants to merge 13 commits into
NVIDIA:codex/cuda-coop-tile-base-20261109from
tpn:codex/cuda-coop-tile-standalone-20261109

Conversation

@tpn

@tpn tpn commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Add cooperative CUB primitives for Python and C++ Tile kernels as the standalone cuda-coop-tile package. Both frontends share native code under tile/; Python lives under python/cuda_coop_tile/. Existing imports, C++ includes, namespaces, and CMake interfaces are preserved. Thirteen topical commits separate guidance, infrastructure, primitive families, CI, documentation, and toolkit compatibility.

Full documentation preview · Tile guides and APIs

The native provider accepts compiler-created toolkit mirrors when their ordered CUDA include directories and loaded NVRTC library identify the same filesystem objects. It still rejects mixed toolkits before compilation. Windows installation guidance includes DLL search paths for native compiler subprocesses. This leaves cuTile's nvJitLink handling and the matching 1.8.0 frontend pins unchanged.

Source builds require CUDA 13.5, the public CUDA Tile declaration translator, and separately supplied Tile/SIMT SDK inputs. Pending SDK sources are excluded from Git, sdists, and wheel source payloads; missing inputs fail native configuration clearly.

Linux passes 102 native tests with the full toolkit, 102 with separate runtime/NVRTC headers, and a four-family Python GPU composition with a mirror introduced only in the compiler child. Fresh Windows x64 and ARM64 native builds, installations, and installed CMake ScanReduce GPU consumers pass. Windows mirror coverage remains unqualified: host policy prevents junction traversal, so four tests report explicit capability skips on each host. Earlier wheel, broader GPU, and sanitizer results retain their original source attribution. The full Torch-based Python GPU suite remains unqualified on Windows ARM64; mixed-size Scan still needs the documented explicit worker-count workaround.

The full documentation build passes with warnings treated as errors, including rendered navigation and API-link checks.

This draft uses the November 9 main-plus-removal comparison while #12296 remains open; rebase and retarget to main after removal lands. The review diff is independent of CUTLASS implementation commits. Iteration CI uses the existing override matrix and an explicit CUDA 13.5 container; 13.X remains 13.4. The generated default development container is CUDA 13.5 with GCC 13. Before acceptance, empty the override entries without deleting the key and run the normal affected-project matrix. Local and override results do not establish merge readiness. No package release is included.

@copy-pr-bot

copy-pr-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-project-automation github-project-automation Bot moved this to Todo in CCCL Nov 9, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Progress in CCCL Nov 9, 2026
@tpn
tpn force-pushed the codex/cuda-coop-tile-standalone-20261109 branch 9 times, most recently from 32fe7a5 to 9206fd4 Compare November 10, 2026 04:29
Keep shared native ownership and language-specific Tile contracts clear.
Apply the design tenets to implementations, tests, and documentation.

Signed-off-by: Trent Nelson <trent@trent.me>
@tpn
tpn force-pushed the codex/cuda-coop-tile-standalone-20261109 branch from 9206fd4 to fec4aa6 Compare November 10, 2026 05:09
Define the canonical TileIR interface and generate matching C++ and
Python declarations and provider schemas. Add the root build option
and a header-only CMake interface for C++ Tile consumers.

Signed-off-by: Trent Nelson <trent@trent.me>
@tpn
tpn force-pushed the codex/cuda-coop-tile-standalone-20261109 branch 4 times, most recently from 9eb1e06 to e291eed Compare November 10, 2026 09:05
tpn added 10 commits November 10, 2026 12:31
Model logical requests independently of physical worker selection.
Validate declaration identity, probe scratch requirements, and preserve
owned compilation resources through native bundle construction.

Signed-off-by: Trent Nelson <trent@trent.me>
Preserve the cuda.coop.tile import and C++ interfaces while owning
headers and native artifacts independently of the former distribution.
Lower logical reductions and prefixes through the shared provider,
including axis shapes, runtime seeds, and mixed logical extents.

Signed-off-by: Trent Nelson <trent@trent.me>
Preserve the semantic layout width across Python and C++ calls. Lower
inverse blocked and striped permutations through the shared provider,
keeping the compiler responsible for physical participation.

Signed-off-by: Trent Nelson <trent@trent.me>
Return fresh Tile values for shuffle, adjacent difference, and
discontinuity operations with explicit boundary behavior. Keep Python
and C++ wrappers and behavioral family tests together.

Signed-off-by: Trent Nelson <trent@trent.me>
Expose bounded histograms and run expansion through the shared provider.
Preserve count dtypes, decoded shapes, offsets, and runtime bounds
across the Python and C++ interfaces.

Signed-off-by: Trent Nelson <trent@trent.me>
Sort logical Tile values while preserving input values and key/payload
association. Keep valid-item handling, padding rules and ordering
aligned with the underlying CUB primitive.

Signed-off-by: Trent Nelson <trent@trent.me>
Preserve CUB radix ordering and stable key/payload association in Tile
frontends. Accept supported floating keys and include the current CUB
digit-extractor declaration explicitly.

Signed-off-by: Trent Nelson <trent@trent.me>
Select keys and associated payloads with explicit valid output regions.
Teach the underlying CUB path to honor bounded input and radix ranges
while preserving key/payload association.

Signed-off-by: Trent Nelson <trent@trent.me>
Exercise composed kernels and installed consumers across frontend
contracts. Register Tile host and TileIR checks in pull-request CI,
with TileIR coverage for upstream header changes in the lite matrix
and a focused iteration override.

Regenerate the default container from CUDA 13.4/GCC 16 to
CUDA 13.5/GCC 13, following the existing newest-toolkit selection.
Keep native SDK-dependent qualification separate from public CI.

Signed-off-by: Trent Nelson <trent@trent.me>
Organize shared concepts and interoperability under Tile, with Python
and C++ guides, references, and executable examples beneath it. Preserve
useful reference labels and describe standalone builds with separately
supplied SDK inputs.

Signed-off-by: Trent Nelson <trent@trent.me>
@tpn
tpn force-pushed the codex/cuda-coop-tile-standalone-20261109 branch from e291eed to 6aa3e9a Compare November 10, 2026 22:17
Compiler-created toolkit mirrors can coexist with an original toolkit
root in the environment. Accept distinct roots only when their ordered
include directories and loaded NVRTC file have the same identities.

Preserve conflicting-toolkit diagnostics, exercise both cases through
the native provider, and document Windows DLL search setup.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant