Skip to main content

presk_manual/
lib.rs

1#![doc = include_str!("../manual/index.md")]
2#![allow(rustdoc::redundant_explicit_links)]
3
4/// Building and running the tool.
5#[doc = include_str!("../manual/install.md")]
6pub mod install {}
7
8/// A guided tour: write programs, run them, read the errors, export to
9/// PyTorch, train, give a budget, choose a layout, export to C, test
10/// everything (`make tutorial` runs every command).
11#[doc = include_str!("../manual/tutorial.md")]
12pub mod tutorial {}
13
14/// The `presk` command line: subcommands, flags, exit codes.
15#[doc = include_str!("../manual/cli.md")]
16pub mod cli {}
17
18/// The Presk language as accepted by this version: lexical structure,
19/// declarations, types, expressions, configuration blocks.
20#[doc = include_str!("../manual/language.md")]
21pub mod language {}
22
23/// Training: `presk train` on any backend, the loop, checkpoints, and what a
24/// precision budget binds in a training run.
25#[doc = include_str!("../manual/training.md")]
26pub mod training {}
27
28/// Native execution: the `Backend` seam, PSK-Kernel v0 and its vector form,
29/// realizations, the Cranelift backend, the layouts of a contraction, threads
30/// at a depth, the conformance suite.
31#[doc = include_str!("../manual/native.md")]
32pub mod native {}
33
34/// The C export: an entry as a C program computing the native backend's bits
35/// (`presk export --target c`), how it is made, its exactness rules, its
36/// threads, sampling and integer weights, what is checked, and the SCoP mode
37/// for polyhedral tools.
38#[doc = include_str!("../manual/export_c.md")]
39pub mod export_c {}
40
41/// `presk explain`: one compilation as a document, every stage's
42/// representation and its decisions, each figure the commands' own.
43#[doc = include_str!("../manual/explain.md")]
44pub mod explain {}
45
46/// The document `presk explain` writes for the tutorial's `loss`, generated
47/// (`make explain-manual`) and held current by a test.
48#[doc = include_str!("../manual/explain_loss.md")]
49pub mod explain_loss {}
50
51/// The course GPT's network diagram at level 2, generated (`make
52/// network-figure`) and held current by a test.
53#[doc = include_str!("../manual/explain_network.md")]
54pub mod explain_network {}
55
56/// `presk memory`: what a program needs in memory, counted from the
57/// program: the peak of live bytes beside the C arena, a training step under
58/// both `--remat`s, the polynomials, the page's overlay (0.15.0).
59#[doc = include_str!("../manual/memory.md")]
60pub mod memory {}
61
62/// The corpus: models from an NLP course, used as a forcing function.
63#[doc = include_str!("../manual/corpus.md")]
64pub mod corpus {}
65
66/// Coverage: what the shape fragment can say, measured on the MLPerf
67/// architectures — which families are expressible and what the rest cost —
68/// and BERT-large run at MLPerf's constants.
69#[doc = include_str!("../manual/coverage.md")]
70pub mod coverage {}
71
72/// Precision as a resource: the magnitude envelope, the bound and the
73/// condition number, sensitivities, the solver, integer weights, a budget on
74/// the training step, and what a budget does and does not promise.
75#[doc = include_str!("../manual/precision.md")]
76pub mod precision {}
77
78/// Experiments: shapes as types, the realization gap of training against the
79/// exact reference, the statements of 0.4.0 to 0.10.0 answered by measurement,
80/// MLPerf's acceptance rule beside a budget, the three tests of RA4, the C
81/// export's statements, and a training step that pays.
82#[doc = include_str!("../manual/experiments.md")]
83pub mod experiments {}
84
85/// PSK-Realize: fusion groups, what shares a loop nest, and what that buys;
86/// realization plans, a layout per nest, and how a plan is chosen.
87#[doc = include_str!("../manual/realize.md")]
88pub mod realize {}
89
90/// Optimization: e-graph rewriting of PSK-Core (`--opt`, `presk dump --stage
91/// core-opt`), the rules, the oracle, what changes; the calibrated cost
92/// models, the layout model's load term, and what its fresh test found.
93#[doc = include_str!("../manual/optimization.md")]
94pub mod optimization {}
95
96/// Serving: the `inference serve` block, `presk serve` on any backend,
97/// `serve.py` in the export.
98#[doc = include_str!("../manual/serve.md")]
99pub mod serve {}
100
101/// Data files: the `.psk.d` container, `presk data`, the training pipeline.
102#[doc = include_str!("../manual/data.md")]
103pub mod data {}
104
105/// Diagnostics: how errors are reported and the list of codes.
106#[doc = include_str!("../manual/diagnostics.md")]
107pub mod diagnostics {}
108
109/// Every external tool and library, what it is and why it is used.
110#[doc = include_str!("../manual/dependencies.md")]
111pub mod dependencies {}
112
113/// What each version and step implements; what is not there yet.
114#[doc = include_str!("../manual/status.md")]
115pub mod status {}