Skip to main content
C++ annotations are comments, so they need no build-system changes and add no link-time dependency. They attach to the next declaration.
csrc/gemm_sm90.cu
A value can continue on the following comment lines. Indent them.

Fields

Templates must be instantiated to be verified: list the instances you actually deploy.

Macro form

Teams that prefer macros can include the header shipped with the package (installed under <prefix>/include):
Every macro (THEFORMALERA_IMPLEMENTS, THEFORMALERA_BIND, THEFORMALERA_LAYOUT, THEFORMALERA_DOMAIN, THEFORMALERA_ASSUME, THEFORMALERA_INSTANTIATE, THEFORMALERA_GRID) expands to nothing.

Scan configuration

theformalera.toml
theformalera init detects CUTLASS checkouts under third_party/cutlass/include or cutlass/include and fills in include for you.

What you get today

Device-IR lifting for CUTLASS and CuTe is on the Phase 2 roadmap. A CUTLASS instance is reported UNKNOWN today, never PASS.
Even so, annotating CUTLASS kernels is worth it now:
  • scan and coverage count them, so you can see which graph nodes have an implementation;
  • trace records their launches (THEFORMALERA_TRACE_LAUNCH, or theformalera.trace.record_launch from a PyTorch extension) for L3 sign-off;
  • when Volta is available, the PTX of each instance is checked for data races and sampled equivalence. A numerically confirmed Volta rejection is a genuine FAILED, and an acceptance is attached as evidence.
For CUTLASS kernels in CI, run the job in a CUDA devel container (nvidia/cuda:<version>-devel-ubuntu22.04) so that nvcc is available. No GPU is needed.