# code/scripts | script | purpose | device | |---|---|---| | `fetch_samples.sh` | downloads the public sample data that is not redistributable (sha256-checked) | no | | `bench.py` | stage breakdown of warm forwards on several inputs (API split, host_in / H2D / trace / b2b / D2H, e2e p50 / p99, AICLK, the smoke agreement check; `--dispatch` / `--num-cqs` for the D14 matrix, `--rig-switch`): the card / OPT numbers | yes, via `bin/devrun` | | `profile_ops.py` | Tracy + device profile: one eager frame with module signposts and `--rounds` signposted traced replays (`python -m tracy -r -p --op-support-count 6000 ...`); `--graph-report DIR` writes a ttnn-visualizer graph report of one eager frame instead | yes, via `bin/devrun` | | `profile_summary.py` | summary of a `profile_ops.py` ops CSV: programs, kernel sum, span, op-to-op gaps, per-module / per-op-code tables (eager labels carried to the trace op for op), top ops | no | | `container_smoke.sh` | serve ONE serve profile of the built package (`--profile NAME`; default profile otherwise), run `server/smoke_test.py` against it (asserts ETH dispatch, the 12x10 grid and the profile's pins; compares with the stored CPU reference), keep the evidence (container log, `/info`, the `/predict` output and the result, in `logs/smoke/` of the repo or `--log-dir DIR`), always stop it; one `bin/devrun -t 3600 -k 150` window per profile | yes | | `make_synthetic_sample.py` | the shipped sample `samples/synthetic_8cam*` (generated, Apache-2.0): `render` (a ray-cast street seen by a generic METEOR-like rig, preset `calib/synthetic_8cam.json`), `optimise` (gradient ascent on the object pixels through the fp32 CPU reference until the 3D heads report the objects with margin), `finalise` (PNGs, request manifest, the stored CPU-reference `/predict` body, the feed sha256 golden) | no (research venv) | | `make_sample.py` | builds the PandaSet 019 frame 40 sample (METEOR demo-scene layout, request manifest, preset `pandaset_019`) from the research ship sample; `--dest staging` (default: the git-ignored `staging_samples_pandaset/`, not shipped until the user approves PandaSet samples) or `--dest package` | no | | `make_goldens.py` | CPU-reference goldens (taps + outputs of 4 frames under `research/meteor/goldens/`, never shipped), the small decoded golden `tests/goldens/pandaset_019_f40_reference.json` and the reference body `samples/pandaset_019_f40.reference.json` of the PandaSet sample (in the staging dir while it is not shipped); cross-checked against the research ONNX Runtime goldens (research venv) | no | | `stress_frames.py` | contained stress of the `frame` trace (the ETH-dispatch hang investigation): `--mode replay` / `rigs` / `segrigs`; every read bit-compared per rig; `--rigs shipped[:N]` needs no golden (rigs from the shipped sample: what the container check runs) | yes, via `bin/devrun` | | `run_public_frames.py` | the served model on the public-dataset frames of `research/meteor/public_data` (feed sha256 checked), TT outputs written in the CPU-golden layout for `compare_tt.py` and `make_demo.py` (development workspace only) | yes, via `bin/devrun` | | `make_demo.py` | the card's `media/` from TT outputs: cards, camera heads and the animation of the public frames (research renderer: privacy blur, attribution footers), the TT-vs-CPU bird's-eye view, the shipped-sample render, `media/ATTRIBUTION.md` | no (research venv) | | `dump_device_outputs.py`, `device_stage_check.py`, `precision_emulation.py`, `repro_*_eth.py` | port tools: raw device outputs of golden frames, eager stage checks, CPU emulation of precision policies, the standalone ETH-hang repros (PORT_LOG 12.7) | partly | Everything here ships in `code/` on the Hub and inside the image (`source.extra_code` lists `scripts`).