# code/scripts | script | purpose | device | |---|---|---| | `bench.py` | stage breakdown of warm plans (load / host_pre / pack / host_in / H2D / trace / D2H / host_post / e2e / b2b, p50 / p99 / min, AICLK) on one or more scene `.npz` files, `--dispatch` / `--num-cqs` for the dispatch / CQ matrix (the card and `OPT_BASELINE.md` numbers) | yes, via `bin/devrun` | | `profile_ops.py` | one eager plan (stage `m:` and layer-kind `c:` signposts) + one traced replay between signposts under the device profiler (`python -m tracy -r -p -v --op-support-count 16000 ...`: a plan is 6,282 programs, over the default 1,000-program buffer) | yes | | `bringup_device.py`, `precision_exp.py`, `split_error.py` | the port's numerics experiments (module PCC per configuration, LayerNorm / split-matmul / attention variants, where the plan error of a scene comes from: device encoder vs device decoder); their logs and findings are in `PORT_LOG.md` (workspace) | yes | | `ref_golden.py` | goldens of the fp32 CPU reference (per-module taps, final outputs, the stored `/predict` references next to the samples) for the device tests; research venv (onnxruntime): `tools/research-venv/bin/python code/scripts/ref_golden.py` | 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 | | `fetch_samples.sh` | downloads public sample data that may not be redistributed (sha256-checked); diffusion-planner-p150 has none to fetch: both shipped samples are Apache-2.0, and the nuScenes-derived planning instants of the accuracy tables live in the tt-models workspace only | no | Everything here ships in `code/` on the Hub and inside the image (`source.extra_code` lists `scripts`). The card's demo media (`media/`) were rendered from p150 outputs by workspace scripts that are not shipped, because most of the data they read (nuScenes) may not be redistributed (`media/ATTRIBUTION.md`). `examples/quickstart.py` writes a simple render (`quickstart_bev.png`: the input tensors and the plan, bird's-eye view) for any scene `.npz`.