Skip to content

Documentation

  • guide/tutorial.md: start here: getting started, from the install to a small model running from Python, Rust and C++, step by step.
  • guide/migrate.md: migrating an existing model (a torch model, or a hand-written CUDA, C++ or Rust engine), with GPT-2 as a worked example.
  • scope.md: what tilefish is and is not, and how features are added.
  • ../../README.md: the overview, the install and a quick start for each host.
  • ../zh-CN/README.md: this index in Simplified Chinese, which lists the Chinese pages.

Guide

The tutorial and the migration guide, then the reference of each stage, from a declaration to a launch from a host:

  • guide/tutorial.md: getting started: types and type errors, a generated kernel, a Triton extern, a pinned cuBLASLt GEMM, a graph, a run against torch, an export with buckets and its replay, the same plan from Rust and C++, a lock and an export without a GPU.
  • guide/migrate.md: migrating an existing model: the method as a checklist (the original's ops, an implementation per op, the graph, verifying layer by layer, deploying with a shadow run, performance last), the common pitfalls, GPT-2 from transformers as a worked example (python/examples/gpt2/), and a hand-written engine.
  • guide/build.md: how a build works: its steps, the jit, reference and replay modes, pins and reproducible exports, what identifies a binary (its Triton IR), the build cache, what replay refuses, the TF32 guard, trust, and what CI checks on a GPU.
  • guide/operators.md: views, device scalars, prebuilt binaries and pinned library calls: strided views and shared strides, views that do not start on 16 bytes, device scalars, a dimension only an Out tensor has, prebuilt PTX and cubin, null pointers and 64-bit dimension scalars, Gluon kernels, one implementation per architecture, TMA descriptors, warp-specialised kernels, launch shapes, pinned cuBLASLt GEMMs (f16, f32 with TF32 off, the four layouts, SM partitions, cuBLASLt epilogues), pinned cuDNN convolutions and CuTe DSL kernels.
  • guide/lowering.md: masks, indices, gathers and copies in a lowered @kernel, with their numerics: comparisons and selects, iota, argmax, gather_rows and scatter_rows, integer casts, IEEE math, the primitives for reproducing a CUDA kernel, the CUDA math guard, ordered sums, broadcasts, contiguous, im2col, im2col1d and col2im1d.
  • guide/plans.md: launch plans: a graph as a static list of launches over one arena, CUDA graphs, an Out written over its input, copy and memset steps, returned views, named outputs, inputs and weights, plan sets, an arena shared by the plans of a set, carried buffers, debug taps and one step alone.
  • guide/locked-export.md: locked exports: a lock file made once on a GPU of the target device, and an export from it on a machine without a GPU (CI, an image build) that writes the same files byte for byte; what a device contributes, the lock's format, what chose each implementation (selections), what is checked where.
  • guide/fusion.md: fusion of the arithmetic in a graph body, its modes, epilogue hooks on externs and cuBLASLt epilogues.
  • guide/rewrites.md: rewrites that know about rounding: exact and numerics-changing rules, num_warps and FMA contraction.
  • guide/sass.md: SASS explained and asserted: traces, tilefish-explain, SASS assertions, the advisor and probes in short.
  • guide/rust.md: the Rust host, tilefish.hosts.rust.emit and the byte-identity gate.
  • guide/cpp.md: the C++ host (the C ABI and tilefish.hpp), tilefish.hosts.cpp and the C++ half of the gate.

Reference

Design records and history