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, thejit,referenceandreplaymodes, pins and reproducible exports, what identifies a binary (its Triton IR), the build cache, whatreplayrefuses, 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 anOuttensor 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_rowsandscatter_rows, integer casts, IEEE math, the primitives for reproducing a CUDA kernel, the CUDA math guard, ordered sums, broadcasts,contiguous,im2col,im2col1dandcol2im1d.guide/plans.md: launch plans: a graph as a static list of launches over one arena, CUDA graphs, anOutwritten 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_warpsand 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.emitand the byte-identity gate.guide/cpp.md: the C++ host (the C ABI andtilefish.hpp),tilefish.hosts.cppand the C++ half of the gate.
Reference¶
- The formats a host reads:
manifest-schema-3.md: the manifest (kernel entries, the ABI, prebuilt binaries, pinned library calls);plan-schema-1.md: launch plans and plan sets.
numerics.md: the numerics contract's dependencies, and how to check it again after a CUDA or torch change.cute.md: CuTe DSL kernels as externs (thenvidia-cutlass-dslpin and its licence).- Tools:
explain.md: traces,tilefish-explainand SASS assertions;instrument.md: probes and the instrumented variant;advise.md: the fusion advisor.
- The Rust crate's own page:
../../crates/tilefish/README.md.
Design records and history¶
rfcs/: 0001, plan fusion; 0002, the C++ host; 0003, epilogue and prologue fusion.../../CHANGELOG.md: what each release changed.