1# @ajax/mesh-sched-needs
23What a program needs and prefers from the fleet scheduler (`msn_needs`): backends, arch,
4`min_mem_mb`, `prefer` / `avoid` terms (`cuda`, `host:dgx-00`, `system:2`, `arch:aarch64`),
5`replicas = N | all`, spread or pack, `colocate_with`, the pipes it feeds, a lockstep group
6(`group_size`, `group_members`), priority, `cpu` / `mem_mb` reservations, how it may migrate, and its
7GPU node shape. `msn_encode` / `msn_decode` are the document's one-token form
8(`b=cuda;ar=-;mm=0;...`), byte for byte the Rust's; `msn_summary` is the `sched` line.
910## Ported from
1112[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/sched.rs`:
13`Replicas`, `Migrate`, `Term` (`parse`, `word`, `matches`) and `Needs` (`default`, `encode`, `decode`,
14`summary`).
1516## Tests
1718`tests/needs.c`: the Rust's `needs_round_trip_and_terms`, the exact encodings and summaries, every
19decode error. The cpu value is written with Rust's float Display (`@ajax/rust-fmt`).
2021## Licence
2223MIT. See the repository's LICENSE.