Example CSL programs, including tutorials and benchmarks that demonstrate individual language features and larger application kernels, live in the SDK examples GitHub repository.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.
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 GitHubgemv-01-complete-program
A complete, runnable CSL program on a single PE. View on GitHubgemv-02-memory-dsds
Use memory data structure descriptors (DSDs) for efficient tensor operations. View on GitHubgemv-03-memcpy
Copy tensors between host and device with thememcpy functionality of
SdkRuntime.
View on GitHub
gemv-04-params
Use compile-time parameters to specialize a program. View on GitHubgemv-05-multiple-pes
Extend the program to run on multiple PEs. View on GitHubgemv-06-routes-1
Use routes and colors to distribute a single GEMV across multiple PEs. View on GitHubgemv-07-routes-2
More advanced routing across multiple PEs. View on GitHubgemv-08-routes-3
Further extend the GEMV computation across a 2D grid. View on GitHubgemv-09-streaming
Alternative streaming version of the previous example. View on GitHubTopic tutorials
Focused examples illustrating specific language or library features.topic-01-arrays-and-pointers
Pass and return arrays in compile-time functions. View on GitHubtopic-02-libraries
Use libraries bundled with the CSL compiler. View on GitHubtopic-03-streaming-wavelet-data
Tasks activated in response to incoming wavelets. View on GitHubtopic-04-sparse-tensors
Efficiently stream only non-zero entries of sparse tensors. View on GitHubtopic-05-sentinels
Use sentinels with routable colors. View on GitHubtopic-06-switches
Fabric switches for limited runtime control of routes. View on GitHubtopic-07-switches-entrypt
Encode a special entry point with fabric switches. View on GitHubtopic-08-filters
Fabric filters that let a PE selectively accept incoming wavelets. View on GitHubtopic-09-fifos
Buffer PE input/output with a FIFO DSD. View on GitHubtopic-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 GitHubtopic-14-color-swap
Color swap feature on WSE-2. View on GitHubtopic-15-wse3-microthreads
Explicit microthread IDs on WSE-3. View on GitHubtopic-16-queue-flush
Flushing output queues on WSE-3 when multiple colors share a queue. View on GitHubPipeline 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 GitHubpipeline-02-fifo
Use a FIFO to avoid stalls on large inputs. View on GitHubpipeline-03-multiple
Reduce FIFO resource consumption with multiple pipelines. View on GitHubSDK Layout tutorials
Tutorials for theSdkLayout host API.
sdklayout-01-introduction
Introduces theSdkLayout API.
View on GitHub
sdklayout-02-routing
Define routes between code regions. View on GitHubsdklayout-03-ports-and-connections
Attach ports to code regions and wire them together. View on GitHubsdklayout-04-h2d-d2h
Connect ports to host-to-device and device-to-host streams. View on GitHubsdklayout-05-gemv
Put the pieces together in a full GEMV program. View on GitHubBenchmarks
Programs that demonstrate more complex kernels on the Wafer-Scale Engine.gemv-checkerboard
GEMV using a checkerboard distribution across PEs. View on GitHubgemv-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 residualr = b - Ax on a 2 x 2 rectangle of PEs.
View on GitHub

