For step-by-step introductory tutorials that walk through the GEMV programs
below, see Build a GEMV Kernel.
GEMV Tutorial Series
A progression of general matrix-vector product (GEMV) programs that introduce CSL features one at a time.1. Basic CSL Syntax
First in a series; covers preliminaries of CSL syntax.
2. A Complete Program
A complete, runnable CSL program on a single PE.
3. Memory DSDs
Use memory data structure descriptors (DSDs) for efficient tensor operations.
4. Host-Device Memcpy
Copy tensors between host and device with the
memcpy functionality of SdkRuntime.5. Compile-Time Parameters
Use compile-time parameters to specialize a program.
6. Multiple PEs
Extend the program to run on multiple PEs.
7. Routes and Colors
Use routes and colors to distribute a single GEMV across multiple PEs.
8. Advanced Routing
More advanced routing across multiple PEs.
9. Routing Across a 2D Grid
Further extend the GEMV computation across a 2D grid.
10. Streaming GEMV
Alternative streaming version of the previous example.
Topic Tutorials
Focused examples illustrating specific language or library features.Arrays and Pointers
Pass and return arrays in compile-time functions.
Compiler Libraries
Use libraries bundled with the CSL compiler.
Streaming Wavelet Data
Tasks activated in response to incoming wavelets.
Sparse Tensors
Efficiently stream only non-zero entries of sparse tensors.
Sentinels
Use sentinels with routable colors.
Fabric Switches
Fabric switches for limited runtime control of routes.
Switches as Entry Points
Encode a special entry point with fabric switches.
Fabric Filters
Fabric filters that let a PE selectively accept incoming wavelets.
FIFOs
Buffer PE input/output with a FIFO DSD.
The @map Builtin
The
@map builtin for custom operations on data.Collectives
Inter-PE communication with the
<collectives_2d> library.The Debug Library
Tracing via the
<debug> library.Simulator Printing
Print values directly from the simulator.
Color Swap
Color swap feature on WSE-2.
WSE-3 Microthreads
Explicit microthread IDs on WSE-3.
Queue Flushing
Flushing output queues on WSE-3 when multiple colors share a queue.
Pipeline Tutorials
Examples that build on wavelet-triggered tasks to process streaming data.1. Basic Pipeline
Process one wavelet at a time with wavelet-triggered tasks.
2. Pipeline with a FIFO
Use a FIFO to avoid stalls on large inputs.
3. Multiple Pipelines
Reduce FIFO resource consumption with multiple pipelines.
SDK Layout Tutorials
Tutorials for theSdkLayout host API.
1. Introduction to SdkLayout
Introduces the
SdkLayout API.2. Routing Between Regions
Define routes between code regions.
3. Ports and Connections
Attach ports to code regions and wire them together.
4. Host-Device Streams
Connect ports to host-to-device and device-to-host streams.
5. A Complete GEMV Program
Put the pieces together in a full GEMV program.
Benchmarks
Programs that demonstrate more complex kernels on the Wafer-Scale Engine.GEMV Checkerboard
GEMV using a checkerboard distribution across PEs.
GEMV with Collectives
GEMV using the
<collectives_2d> library.GEMM with Collectives
SUMMA matrix-multiply using the
<collectives_2d> library.Residual Computation
Compute a residual
r = b - Ax on a 2 x 2 rectangle of PEs.Cholesky Factorization
Cholesky factorization of a symmetric positive-definite matrix.
25-Point Stencil
Time-marching 25-point stencil computation.
Bandwidth Test
Measure host-to-device and device-to-host WSE bandwidth.
7-Point Stencil SpMV
7-point stencil sparse matrix-vector performance test.
Power Method
Power method on a sparse matrix.
Conjugate Gradient
Conjugate Gradient (CG) solver on a sparse matrix.
Preconditioned Conjugate Gradient
Preconditioned Conjugate Gradient solver.
BiCGSTAB Solver
BiCGSTAB solver on a sparse matrix.
Single-Tile Matrix-Vector Product
Optimized matrix-vector products confined to single PEs.
Row and Column Broadcast
Row- and column-wise broadcasts across a PE rectangle.
3D FFT
3D Discrete Fourier Transform with a pencil decomposition.
Conway's Game of Life
Conway’s Game of Life on the WSE.