With Jetlink running the big model (on, supported, no Chestnut), Active Big
in Galaxy and on the device is Jetlink's choice: the model manager marks a
big model selectable when its catalog entry names the ONNX it was built from
(source_sha256), downloaded or not, since Jetlink's host fetches the ONNX
itself. The choice is the new JetlinkModel param, {sha256, displayName}, the
adapter's big-model key; Chestnut's own Active Big is left as it was. None
leaves the model to the Jetlink app, and the manager words it.
A newer choice made in the Jetlink app is written back into JetlinkModel by
jetlink, so Active Big shows the model that drives; one StarPilot does not
list is named as the app's.
JetlinkModel is a new key in params_keys.h: the native params libraries need
their usual rebuild.
The output used to move after the small model's warmup had linked the
warp to its address, which needed the warp to link again by dropping a
private tinygrad cached property. Had that ever stopped working, the
small model's own warp would have kept writing the freed memory.
modeld now asks the adapter's coherent_warp() (Jetlink's make_coherent
with Jetlink on, off legacy9d) and load_verified_model moves the small
model's warp output before warmup(), as Jetlink's own warp moves its
output before its first call. CatalogWarp only reads the answer
(warp_copied): sent from where it is, or copied out, chosen once.
tinygrad maps the warp's QCOM output write-combined, which the CPU reads
uncached: CatalogWarp spent ~2.9 ms a frame copying the frame out, out
of the 46 ms a host has to answer in. It now moves the output to
IO-coherent write-back memory with Jetlink's warp.make_coherent, as
Jetlink's own warp does, and the link sends straight from it (0.22 ms
measured for Jetlink's warp). The warp has run by then, and tinygrad
bakes a held buffer's address in at link time, so its program links
again on the next call. If the kernel refuses the memory, the frame is
copied out as before, and the adapter's log says which.
TinyJit's per-call input checks are left alone: 0.045 ms a call on a
Mac under this tinygrad, not the ~1 ms they cost under Jetlink's.
warp.make_coherent is public, for an adapter's own warp: it moves a QCOM
output to memory the CPU reads cached, as Jetlink's warp does.
CREDITS.md and JETLINK.md name the new revision.
CatalogModelState.warp_frames is the warp branch of run(), which run()
and CatalogWarp now both call, so the link enqueues exactly what the JIT
was captured with and reads npy and input_queues live rather than as
they were when it was built. CatalogWarp binds the output once (the
captured JIT returns the same buffer every call), reuses one pair of
warm-up frames for the probe and frees them, and drops their blob
cache entries. model_warp lets a failure raise without logging it
too: Jetlink logs it as it keeps the small model.
Jetlink's stock driving warp is a legacy9d pickle, which a native02e
modeld cannot load, so the link never took over there. The adapter's
model_warp (Jetlink's optional hook since 0605e34) now hands Jetlink
the small model's own camera warp (CatalogWarp) on any other runtime:
the same JIT, inputs and blob cache, read into host memory after each
frame, with a probe at load that refuses an output not read live.
Under legacy9d it returns None and Jetlink loads the stock pickle.
From #253, without its edit to jetlink_repo or the hold tolerance
override.
The adapter may now supply the warp the link sends (ModelSide.model_warp,
optional; what it returns is checked against interface.FrameWarp before
the frame loop). Without one, or when it returns None, Jetlink loads the
stock driving warp pickle as before. API stays 3.
CREDITS.md and JETLINK.md name the new revision.
jetlink's own kit checks the adapter module and modeld's hook order. Tests cover in_control with AOL armed and paused, the driving warp jetlink runs, and the catalog runner's history reset on tinygrad keeping its buffers. JETLINK.md describes the stay-engaged hand-back and the cable rule.
The Jetlink card's state, activity and running model come from jetlink's Status (phase, active, running, running_sha256, running_checkpoint), so StarPilot no longer derives them. A build in progress reads preparing, with its line below.
A Jetlink hand-back while engaged soft-disabled with Big Model Failed and
"Restart the car to retry", although the small model drives on and Jetlink
retries in seconds. Now nothing disengages: a Big Model Lost warning shows
for 5 s. A native chestnut's loss still raises Big Model Failed.
jetlink's swap events also refuse engaging for the second after a swap
(bigModelLoading) and hold the comm and localizer errors the swap's dropped
frame raises, as a chestnut load does. In control is the rule the swap
itself waits on (openpilot, or AOL armed or paused), and a gap in modeld's
runtime record holds the last state instead of reading as a switch.
The warning is a selfdrived alert, like aolAvailability: no new
OnroadEvent, so cereal and schema-policy.json are unchanged.
jetlink runs the driving_warp pickles modeld already ships, so its own warp build, the four jetlink_warp pickles and their QCOM import and validation go.
cable_connected() is true for any host on the USB-C port. With a Chestnut pick downloaded and Jetlink on, every drive waited 10 s for a chestnut, raised Big Model Failed and left Jetlink unattached. The cable now counts only with Jetlink off.
StarPilotAdapter subclasses jetlink's Stock: StarPilot's param names, the
AOL engagement rule, the model root and a CatalogModelState history reset
that keeps its JIT buffers. jetlinkd runs jetlink's owner as it is, modeld
calls the hooks, and Galaxy and analytics read jetlink's runtime record in
place of JetlinkRuntime.
- no big-model slot or catalog keys: jetlink provisions its default model
- jetlink restores the owner's tuning itself; the port draw stays cut with
a host plugged in
- the Jetson is asked to power off on DoShutdown only, capped at 30 s