Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sdk.cerebras.ai/llms.txt

Use this file to discover all available pages before exploring further.

Example CSL programs, including tutorials and benchmarks that demonstrate individual language features and larger application kernels, live in the SDK examples GitHub repository.
For step-by-step introductory tutorials that walk through the GEMV programs below, see Tutorials.

GEMV tutorial series

A progression of general matrix-vector product (GEMV) programs that introduce CSL features one at a time.

gemv-00-basic-syntax

First in a series; covers preliminaries of CSL syntax. View on GitHub

gemv-01-complete-program

A complete, runnable CSL program on a single PE. View on GitHub

gemv-02-memory-dsds

Use memory data structure descriptors (DSDs) for efficient tensor operations. View on GitHub

gemv-03-memcpy

Copy tensors between host and device with the memcpy functionality of SdkRuntime. View on GitHub

gemv-04-params

Use compile-time parameters to specialize a program. View on GitHub

gemv-05-multiple-pes

Extend the program to run on multiple PEs. View on GitHub

gemv-06-routes-1

Use routes and colors to distribute a single GEMV across multiple PEs. View on GitHub

gemv-07-routes-2

More advanced routing across multiple PEs. View on GitHub

gemv-08-routes-3

Further extend the GEMV computation across a 2D grid. View on GitHub

gemv-09-streaming

Alternative streaming version of the previous example. View on GitHub

Topic tutorials

Focused examples illustrating specific language or library features.

topic-01-arrays-and-pointers

Pass and return arrays in compile-time functions. View on GitHub

topic-02-libraries

Use libraries bundled with the CSL compiler. View on GitHub

topic-03-streaming-wavelet-data

Tasks activated in response to incoming wavelets. View on GitHub

topic-04-sparse-tensors

Efficiently stream only non-zero entries of sparse tensors. View on GitHub

topic-05-sentinels

Use sentinels with routable colors. View on GitHub

topic-06-switches

Fabric switches for limited runtime control of routes. View on GitHub

topic-07-switches-entrypt

Encode a special entry point with fabric switches. View on GitHub

topic-08-filters

Fabric filters that let a PE selectively accept incoming wavelets. View on GitHub

topic-09-fifos

Buffer PE input/output with a FIFO DSD. View on GitHub

topic-10-map-builtin

The @map builtin for custom operations on data. View on GitHub

topic-11-collectives

Inter-PE communication with the <collectives_2d> library. View on GitHub

topic-12-debug-library

Tracing via the <debug> library. View on GitHub

topic-13-simprint

Print values directly from the simulator. View on GitHub

topic-14-color-swap

Color swap feature on WSE-2. View on GitHub

topic-15-wse3-microthreads

Explicit microthread IDs on WSE-3. View on GitHub

topic-16-queue-flush

Flushing output queues on WSE-3 when multiple colors share a queue. View on GitHub

Pipeline tutorials

Examples that build on wavelet-triggered tasks to process streaming data.

pipeline-01-basic

Process one wavelet at a time with wavelet-triggered tasks. View on GitHub

pipeline-02-fifo

Use a FIFO to avoid stalls on large inputs. View on GitHub

pipeline-03-multiple

Reduce FIFO resource consumption with multiple pipelines. View on GitHub

SDK Layout tutorials

Tutorials for the SdkLayout host API.

sdklayout-01-introduction

Introduces the SdkLayout API. View on GitHub

sdklayout-02-routing

Define routes between code regions. View on GitHub

sdklayout-03-ports-and-connections

Attach ports to code regions and wire them together. View on GitHub

sdklayout-04-h2d-d2h

Connect ports to host-to-device and device-to-host streams. View on GitHub

sdklayout-05-gemv

Put the pieces together in a full GEMV program. View on GitHub

Benchmarks

Programs that demonstrate more complex kernels on the Wafer-Scale Engine.

gemv-checkerboard

GEMV using a checkerboard distribution across PEs. View on GitHub

gemv-collectives

GEMV using the <collectives_2d> library. View on GitHub

gemm-collectives

SUMMA matrix-multiply using the <collectives_2d> library. View on GitHub

residual

Compute a residual r = b - Ax on a 2 x 2 rectangle of PEs. View on GitHub

cholesky

Cholesky factorization of a symmetric positive-definite matrix. View on GitHub

25-pt-stencil

Time-marching 25-point stencil computation. View on GitHub

bandwidth-test

Measure host-to-device and device-to-host WSE bandwidth. View on GitHub

7pt-stencil-spmv

7-point stencil sparse matrix-vector performance test. View on GitHub

power-method

Power method on a sparse matrix. View on GitHub

conjugate-gradient

Conjugate Gradient (CG) solver on a sparse matrix. View on GitHub

preconditioned-conjugate-gradient

Preconditioned Conjugate Gradient solver. View on GitHub

bicgstab

BiCGSTAB solver on a sparse matrix. View on GitHub

single-tile-matvec

Optimized matrix-vector products confined to single PEs. View on GitHub

row-col-broadcast

Row- and column-wise broadcasts across a PE rectangle. View on GitHub

fft-3d

3D Discrete Fourier Transform with a pencil decomposition. View on GitHub

game-of-life

Conway’s Game of Life on the WSE. View on GitHub