tensor-formula-viz
Installation
SKILL.md
Tensor Formula Viz
Turn a formula or tensor-code path into one dense, slide-ready figure with three zones:
- Top — formula: clean mathematical definition, without shape underbraces.
- Middle — computation: colored blocks, stripes, slices, operators, and communication.
- Bottom — meaning: compact explanation of every shape dimension and non-obvious operation.
Workflow
- Reduce the input to one primary computation path. Omit equivalent objectives, diagnostics, and secondary metrics unless requested.
- Build a shape-and-semantics ledger: symbol/code name, semantic kind, dtype/domain, global and local shape, axis meanings, range when meaningful, shape-equivalence class, producer/consumer, and contracted/broadcast/reduced axes.
- Choose the smallest visual grammar that exposes the mechanism.
- Reserve non-overlapping stage lanes and object bounding boxes, then draw the three-zone layout.
- Render, inspect, and correct both mathematical and visual alignment.
For code input, trace concrete matmul, einsum, reshape/view, transpose/permute, concat, broadcast, and collective operations. Preserve code variable names when useful; state any inferred shapes or conventions.