# Fearless Concurrency on the GPU: Safe GPU kernels in Rust

**URL:** <https://users.rust-lang.org/t/fearless-concurrency-on-the-gpu-safe-gpu-kernels-in-rust/140790>\
**Category:** announcements\
**Created:** [June 17, 2026, 11:05pm UTC](https://users.rust-lang.org/t/fearless-concurrency-on-the-gpu-safe-gpu-kernels-in-rust/140790 "2026-06-17T23:05:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elibol](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/elibol/32/52961_2.png) [@elibol](https://users.rust-lang.org/u/elibol)\
**Post date:** [June 17, 2026, 11:05pm UTC](https://users.rust-lang.org/t/fearless-concurrency-on-the-gpu-safe-gpu-kernels-in-rust/140790/1 "2026-06-17T23:05:13Z")

</div>

Hi all. I maintain cuTile Rust and just posted the paper "Fearless Concurrency on the GPU."

The idea is to bring safety across the GPU launch boundary and into the kernel, and to safely enable high-performance, non-trivial GPU programs. Host code statically composes "device operations" (DeviceOp). Like Rust iterators, a DeviceOp composes lazily and statically: combinators build the pipeline at compile time, and nothing runs until you execute it (sync, async, or as a replayable CUDA graph).

You partition a mutable output tensor into disjoint pieces on the host, and each tile program gets an exclusive &mut view of its memory, plus the inputs as shared references. Kernels are written with single-threaded semantics (logical tile threads), which the compiler maps to thread blocks with managed shared memory. The pieces are provably disjoint and ordering is threaded through mutable references. Safety stays extensible the usual Rust way: wrap unsafe in safe abstractions where you supply the invariants.

```rust
#[cutile::entry()]
fn add<const B: i32>(
  z: &mut Tensor<f32, {[B]}>, // exclusive write
  x: &Tensor<f32, {[-1]}>, // shared read
  y: &Tensor<f32, {[-1]}>, // shared read
) {
  let tx = load_tile_like(x, z);
  let ty = load_tile_like(y, z);
  z.store(tx + ty);
}

```

On a B200 a safe GEMM impl is competitive with cuBLAS, so the safety is effectively free. We're also seeing performance competitive with state-of-the-art on memory-bound, batch-1 inference.

- Code: [GitHub - NVlabs/cutile-rs: cuTile Rust provides a safe, tile-based kernel programming DSL for the Rust programming language. It features a safe host-side API for passing tensors to asynchronously executed kernel functions. · GitHub](https://github.com/nvlabs/cutile-rs)
- Paper: [[2606.15991] Fearless Concurrency on the GPU](https://arxiv.org/abs/2606.15991)

I'd genuinely value this crowd's take on the safe-API design.

---

<div class="post-metadata">

**Author:** ![user16251](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/user16251/32/30527_2.png) [@user16251](https://users.rust-lang.org/u/user16251)\
**Post date:** [June 18, 2026, 10:19am UTC](https://users.rust-lang.org/t/fearless-concurrency-on-the-gpu-safe-gpu-kernels-in-rust/140790/2 "2026-06-18T10:19:13Z")

</div>

What does an FFT look like, where you might want to partition your array into disjoint stripes?

---

<div class="post-metadata">

**Author:** ![elibol](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/elibol/32/52961_2.png) [@elibol](https://users.rust-lang.org/u/elibol)\
**Post date:** [June 19, 2026, 6:57pm UTC](https://users.rust-lang.org/t/fearless-concurrency-on-the-gpu-safe-gpu-kernels-in-rust/140790/3 "2026-06-19T18:57:38Z")

</div>

Great question.

For FFT I would not use the safe API to expose butterfly stripes as mutable sub-tensors. The fast solution is a bit coarser. Each tile program (tile block / CTA) would be given a mutable ref to one output FFT row, load the whole packed row, perform a mixed-radix factorization in tile values, and store once.

I don't have an example impl to share, but cutile-python exposes a similar algorithm you can check out here: [cutile-python/samples/FFT.py at main · NVIDIA/cutile-python · GitHub](https://github.com/NVIDIA/cutile-python/blob/main/samples/FFT.py)

This is not a fully tuned cuFFT-style implementation, but it is what a zero-overhead cutile-rs impl would look like.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [September 17, 2026, 6:58pm UTC](https://users.rust-lang.org/t/fearless-concurrency-on-the-gpu-safe-gpu-kernels-in-rust/140790/4 "2026-09-17T18:58:05Z")

</div>

Closed on September 17, 2026, 6:58pm UTC

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
