In CUDA 13.5, tile kernels can call SIMT library functions directly

  • PublicPublic
  • 04 Dec, 2026
In CUDA 13.5, tile kernels can call SIMT library functions directly

CUDA Tile lets developers write GPU kernels in terms of tiles rather than threads. A kernel loads a tile of data, operates on it as a whole and stores the result, while the compiler maps the work to threads and manages shared memory and Tensor Cores. Until CUDA 13.5, tile kernels could not call SIMT library device functions. A library operation between two stages of tile code meant splitting the work into separate kernels that passed intermediate results through global memory. CUDA 13.5 adds a preview of Tile/SIMT interoperability: a tile kernel can now call device functions from supported NVIDIA SIMT libraries, and the whole computation compiles into one kernel.

Figure 1. Without interoperability, combining tile code with a SIMT library requires separate kernels that exchange data through global memory. With interoperability, the library call runs inside the tile kernel
Figure 1. Without interoperability, combining tile code with a SIMT library requires separate kernels that exchange data through global memory. With interoperability, the library call runs inside the tile kernel

The bridge between the two models is a tilelib, a .tilelib file shipped with each library. It lists the functions exposed to tile code with their parameters and result types. For each call, the compiler queries the tilelib with tile shapes, data types and target GPU, and gets back one or more SIMT implementations. Each one states its thread count, which elements every thread holds, its shared memory needs and how it synchronizes. An implementation can run per thread, per warp or across the whole block. At compile time the tile compiler, tileiras, picks an implementation that fits the rest of the kernel. It then rearranges tile data to match, allocates shared memory, inserts barriers where needed and links in the SIMT code.

In cuTile Python, libraries expose functions callable inside an @ct.kernel function. MathDx provides modules such as nvmath.tile.fft, nvmath.tile.linalg and nvmath.tile.compress, so an FFT over a tile is simply mfft.fft(data, axis=1). These modules wrap foreign_call from the cuda-tile-preview package (installed via pip as cuda-tile-preview). foreign_call can also invoke any library that ships a tilelib but no Python module. Its arguments are a Tilelib object with a path and version, a symbol name, constant parameters, inputs and output types. The library modules handle all of this for you: they locate the tilelib, derive constant parameters from tile shapes and report shape and type errors. In C++, a __tile_global__ kernel includes a header such as cufftdx_tile.hpp and calls cufftdx::tiles::fft(data, cufftdx::tiles::axis<1>). The header declares the function with __experimental_foreign_decl__, and template parameters play the role of the Python constant parameters.

Compilation needs nvcc with -std=c++20, --enable-tile and --tile-preview simt, and each tilelib passed to tileiras via -Xtileiras -l=path. The same -l option applies when invoking tileiras directly on Tile IR. Libraries also ship CMake targets such as mathdx_tile::cufftdx that add these flags. Kernels are launched with a block size of 1, as in my_kernel<<<grid, 1>>>, because the compiler determines the real thread count. Since library implementations need a fixed thread count, you can steer the choice with num_worker_warps in @ct.kernel or [[cutile::hint(0, num_worker_warps_per_cta = …)]] in C++. For some functions the hint is mandatory. Large FFTs, for example, exist only at specific warp counts, and without the hint the kernel will not compile. Helpers like suggested_tile_config return a tuned warp count and batches per block for a given size, precision and GPU.

The first showcase is a distributed 3D FFT, a workload used in molecular dynamics, turbulence and plasma simulation, and spectral PDE solvers. It is written in cuTile Python, using cuFFTDx for the transforms and NVSHMEM's tile API for communication. A slab decomposition uses three kernels that transform along Y, then Z, then X after the exchange. In the Z kernel, each block computes its FFTs and sends the results straight to the remote GPU with put_block, so computation and communication overlap. On a VR200 NVL72 system, complex-to-complex FP32 and FP64 runs on grids from 512³ to 2048³ across 1 to 64 GPUs performed comparably to cuFFTMp and scaled similarly.

Figure 2. Distributed 3D FFT performance in FP32: CUDA Tile compared with cuFFTMp on VR200 NVL72. Grid sizes from 512³ to 2048³ on up to 64 GPUs. Lower execution time is better
Figure 2. Distributed 3D FFT performance in FP32: CUDA Tile compared with cuFFTMp on VR200 NVL72. Grid sizes from 512³ to 2048³ on up to 64 GPUs. Lower execution time is better
Figure 3. Distributed 3D FFT performance: CUDA Tile compared with cuFFTMp on VR200 NVL72. FP64. Grid sizes from 512³ to 2048³, scaling from 1 to 64 GPUs. Lower execution time is better
Figure 3. Distributed 3D FFT performance: CUDA Tile compared with cuFFTMp on VR200 NVL72. FP64. Grid sizes from 512³ to 2048³, scaling from 1 to 64 GPUs. Lower execution time is better

The second example reconstructs a surface from a 3D scan with GeoSPSR, which builds on Stochastic Poisson Surface Reconstruction, and estimates its uncertainty. A view planner casts one ray per pixel from candidate camera positions and chooses the view with the highest uncertainty. Each tile holds 32 query points owned by one thread block. The block walks the L2-resident Cholesky factor in 64-row panels. Ray casting and covariance lookups are Warp functions exposed via warp.experimental.cutile.foreign_func, and off-diagonal updates use ct.mma on TF32 Tensor Cores with FP32 accumulation. Triangular solves come from cuBLASDx through la.triangular_solve. Work that previously required several kernels exchanging data through global memory now runs as one.