Croqtile Coding Reference¶
Welcome to the Croqtile coding reference. This section provides exhaustive syntax and semantics documentation for Croqtile, a C++ embedded DSL for high-performance kernel programming featuring easy-to-use syntax with zero-cost abstractions, comprehensive compile-time safety, first-class dynamic shapes, and an AI-tuning-friendly design.
What You Will Find Here¶
This reference covers every aspect of programming with Croqtile:
-
Program structure: How Croqtile programs are organized — the
__co__function, host-side APIs, and C++ interoperability. -
Shaped data: Croqtile's type system for multi-dimensional tensors — shapes, MDSpan, spanned data, symbolic dimensions, and dynamic shapes.
-
Loop and parallelism: SPMD parallelism, loop control, tiling, and iteration constructs.
-
Data movement: DMA statements, tiling with
chunkat, TMA, swizzle, and advanced data movement patterns. -
C++ embeddings: Input/output conventions,
__cpp__inline blocks, macros, and preprocessor integration. -
MPMD programming: Thread masking, events, async execution, and warp specialization.
-
Optimization patterns: Tileflow optimizations, async DMA patterns, multi-buffering, and performance tuning techniques.