Repository navigation
Description
This is a tracking issue. It coordinates work for cuda-oxide to be the Rust SIMT participant in CUDA's Tile-to-SIMT interop story. The original proposal from @mohamedsamirx is preserved at the bottom.
Background
cuda-oxide is the Rust SIMT compiler. The tile programming model itself belongs to separate tile frontends (cuTile Python, CUDA Tile C++, future Rust tile DSLs). cuda-oxide's role here is to produce SIMT artifacts (PTX, LTOIR) that those frontends can launch alongside, or eventually link into, tile kernels.
Tile-to-SIMT interop comes in two flavors (per the public cuTile Python Interoperability page):
- Inter-kernel — two separate kernels (one tile, one SIMT) launched on the same CUDA stream, sharing arrays. Supported in the public cuTile Python release today.
- Intra-kernel — a tile kernel calling a SIMT device function from inside its own body. Upstream future work; public tracker: NVIDIA/cutile-python#69.
Plan
Phase 0 — Inter-kernel example (today)
- Minimal
cutile_inter_kernelexample combining a cuda-oxide-built SIMT kernel and a cuTile Python tile kernel sharing a CUDA stream and an array. - README walking through the build and run steps.
- Smoketest coverage goes through the normal example path:
scripts/smoketest.sh -o "^cutile_inter_kernel$"runs cargo oxide runcutile_inter_kernel, which builds the nested cuda-oxide SIMT PTX crate and then runs the cutile-rs host pipeline.
Phase 1 — Tile kernels calling Rust SIMT code (gated)
Gated on NVIDIA/cutile-python#69 exposing a public way for a tile kernel to call SIMT device functions from inside its own body. The exact shape upstream takes (a pre-compiled artifact, a plug-in library, or both) will determine the cuda-oxide side.
When the upstream surface is available:
- A one-shot
cargo oxide emit-ltoir <crate>command for producing the SIMT artifact in a single step. Useful regardless of which mechanism lands; can ship sooner. - A worked example where a tile kernel calls into a Rust
#[device]function in its own body. - A small Rust macro (working title
#[foreign_export]) that takes a natural#[device]function and wraps it to match whatever signature the public mechanism expects, for per-thread, per-warp, and per-block scopes. - Make the cuda-oxide compiler usable as a library (no spawning
cargoorrustcper request). Useful on its own; independent of the upstream shape; can start anytime. - Whatever packaging the public mechanism wants on our side.
How this issue is used
This is an umbrella. Concrete deliverables are spawned as focused child issues only when the work is near-term. Each child issue should reference "Part of #96" so GitHub creates the cross-link. The task lists above tick automatically when their child issues close.
Original proposal by @mohamedsamirx
Summary
CUDA 13.3 introduced CUDA Tile programming for C++ through cuda_tile.h, __tile_global__, and __tile__ functions. I would like to propose investigating whether cuda-oxide should eventually support this programming model, and if so, at which layer.
This is not a request to immediately add a large feature. I am opening this as a design/proposal issue to get maintainer feedback before doing any implementation work.
Motivation
CUDA Tile seems important because it gives CUDA programmers a higher-level way to express tile-oriented GPU work while still mapping efficiently to hardware features such as Tensor Cores, TMA, and modern memory movement patterns.
For cuda-oxide, this could matter long term because:
- tile-oriented programming is becoming a first-class CUDA model;
- Rust GPU code will likely need a way to interoperate with or express tile-level kernels;
- cuda-oxide already has lower-level CUDA abstractions and device-code generation pieces that may eventually intersect with tile programming;
- deciding the right integration point early could avoid ad-hoc support later.
Open Questions
I would like maintainer guidance on whether this fits the project scope, and where it should live if it does.
Some possible directions:
- Interop only: support building/linking/launching C++ CUDA Tile kernels from cuda-oxide workflows.
- Tooling detection: teach
cargo oxide doctoror related tooling to detect CUDA 13.3+ Tile capability. - Examples first: add a small example showing cuda-oxide host/runtime code interacting with a CUDA Tile kernel.
- Rust-facing API later: eventually design Rust abstractions for tile-style programming if that aligns with the project.
- Compiler/backend support: investigate whether cuda-oxide should ever lower Rust code into Tile-compatible IR or whether that is out of scope.
Concerns / Constraints
CUDA Tile appears to be more than a normal intrinsic wrapper. It introduces a distinct tile-level programming model, and current CUDA Tile docs indicate that tile functions and normal SIMT device functions have restrictions around directly calling each other.
That means a direct Rust API may require careful design rather than simply adding bindings.
There may also be practical testing constraints. CUDA Tile requires recent CUDA Toolkit support, and some functionality may depend on newer GPU architectures than many contributors have locally.
Suggested First Step
Before implementation, I suggest we decide what the first useful milestone should be.
My initial preference would be a small investigation/design step, for example:
- document how CUDA Tile kernels are compiled and linked;
- check whether cuda-oxide can interoperate with a minimal C++ Tile kernel;
- identify whether this belongs in
cargo-oxide,cuda-core, examples, or compiler/lowering work; - only then decide whether a Rust-facing API makes sense.
Activity
nihalpasham commentedon May 28, 2026
Thanks for filing the issue. This is a pretty important one. Internally, this is referred to as
Tile-to-SIMT InteropTile-to-SIMT interop is split into two flavors (see the Interoperability page):
cuTile Pythonrelease.Where cuda-oxide fits: we are the Rust SIMT compiler and not the right home for a tile programming model itself. What
cuda-oxidecan be is a good SIMT participant in this interop story. The CUDA Tile compiler is the canonical authority on the tile-side details; the same FFI surface is intended to be shared across all tile frontends (cuTile Python today, CUDA Tile C++, cutile-rs, future ones).On the proposed directions:
cutile python, cutile-rs, or cutile-c++installed, you have what you need.cutile-rskernel sharing a CUDA stream and arrays.examples/cpp_consumes_rust_deviceandexamples/standalone_device_fnwhich produce LTOIR JIT linked to produce PTX.The restriction you flagged about Tile and SIMT device functions not being able to call each other directly: that's where the intra-kernel case comes in, and the upstream foreign FFI dialect is the planned bridge for it. It isn't a blocker for inter-kernel interop, which is what we'll target first.
Plan from here:
Tile<>SIMT interopwith cuda-oxide as the SIMT participant.I'll keep this open and will update once the example PR lands.
[-]Proposal: investigate CUDA Tile support in cuda-oxide[/-][+]Tracking: Tile-to-SIMT Interop (cuda-oxide as SIMT participant)[/+]mohamedsamirx commentedon May 28, 2026
Thanks for turning this into a clear tracking issue.
The Tile-to-SIMT framing makes sense to me.
I’d be very interested in helping with this area, especially the focused follow-up pieces after the initial inter-kernel example shape is clear. For example, I’d be happy to help with tests, README/run instructions, cuda-oxide-side build integration, or smaller child issues spawned from this tracker.
I’ll wait for the initial example PR/update so I don’t duplicate work or choose the wrong API surface, but please feel free to point me at a specific piece when there is one suitable to pick up.
Thanks again for clarifying the direction.
nihalpasham commentedon Jun 1, 2026
Initial inter-kernel Tile/SIMT interop example is now landed in d989fa4.
What changed:
cargo oxide runandcargo oxide buildfor examples that declare extra cuda-oxide device crates.cutile_inter_kernel: a cutile-rs Tile row-softmax stage followed by a cuda-oxide SIMT PTX threshold/scale stage.This covers the first practical inter-kernel path. Intra-kernel Tile interop remains tracked here as follow-up work.
mohamedsamirx commentedon Jun 1, 2026
Now that the first inter-kernel example has landed, one possible gap worth discussing is whether
cutile_inter_kernelshould also cover cuda-oxide on both sides of the Tile stage.The current example proves:
A follow-up could exercise:
That would show cuda-oxide as a SIMT participant both before and after a Tile kernel:
This would still stay fully inside the public inter-kernel model, so it would not depend on the future intra-kernel foreign FFI surface. The main value I see is that it validates same-stream ordering and shared-device-allocation interop in both directions, not only Tile producing data for a SIMT consumer.
Curious how important you think this gap is for the inter-kernel story.
nihalpasham commentedon Jun 3, 2026
I'd (definitely) love more examples. If you'd want to submit a PR, that would be great.
alejandro-soto-franco commentedon Jun 6, 2026
Really like this issue @mohamedsamirx, took the liberty of preparing a PR for
emit-ltoir. Thanks to @nihalpasham for his detailed responses, great contextualisation.feat(cargo-oxide): add `emit-ltoir` to build a crate's LTOIR in one step
feat(cargo-oxide): add `emit-ltoir` to build a crate's LTOIR in one step
feat(cargo-oxide): add `emit-ltoir` to build a crate's LTOIR in one step
feat(cargo-oxide): add `emit-ltoir` to build a crate's LTOIR in one step
alejandro-soto-franco commentedon Jun 29, 2026
Hi y'all, just submitted PR #312 for the in-process library-mode compiler. For my purposes, I intend for this to be a stepping stone to a working integration with Burn. Next step would be a CubeCL-IR→
#[kernel]bridge, which I will raise as a separate issue. Thanks again to @mohamedsamirx for such an instructive issue :)docs(ptx): both PTX crates' consumer inventories predate ptx-schedule (…
feat: custom MemPool support for async tensor allocation (NVIDIA#96)
fix(cargo-oxide): scaffold and clone from NVIDIA/cuda-rust (#1489)
elibol commentedon Nov 12, 2026
Related current Rust-side work: merged #1603 and #1604 provide shared host handles, allocations and async launches for Tile/SIMT composition. #1749 extends foreign tile-library calls with raw-pointer operands. These are distinct parts of the interop story and should be tracked here alongside the original inter-kernel example.