Skip to content

Feat/laned runtime - #2765

Open
kali wants to merge 7 commits into
mainfrom
feat/laned-runtime
Open

Feat/laned runtime#2765
kali wants to merge 7 commits into
mainfrom
feat/laned-runtime

Conversation

@kali

@kali kali commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

kali added 7 commits September 2, 2026 11:49
A laned runtime hands a lane to each stream it serves and seats some of them
in every turn. LaneTable is that bookkeeping, on its own: plain data, no model
and no device, so clearing what a stream left behind stays with the caller
owning the state.
LanedRunnable spawns a handle per stream, each holding a lane of one long-lived
state, and a worker thread owning the state and the lane table both runs the
turns queued at any moment as one: axis 0 of the batched tensors carries a row
per seat, and each stream is handed back its own. Turn policy through
TRACT_MAX_SEATS and TRACT_TURN_LINGER_US.
A laned runnable resets every lane of its state once, at prepare: an op state
that cannot serve several streams at once fails there, rather than at whichever
turn first seats a second stream.
Mean occupancy is what says whether the queue is offering wide turns, and it is
the dial TRACT_MAX_SEATS and TRACT_TURN_LINGER_US are set against.
The memo held one set of stores per node, and their strides come from the output
shape: a turn whose batch axis has another extent than the first one's read the
wrong layout. Rebuild them when the shape or the kernel changes.
The staggered-seats case seats lanes by hand. Add one where a pulsed pad plus
conv is served by a LanedRunnable with a stream per thread, so the seating is
whatever the worker finds queued, and every stream still gets what it gets
running alone.
Its counter advances once per turn of the state, which is a stream's own turn
count only while every turn seats every stream.
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🔴 Bench vs main — 2 speed regression(s)

Reference: 2026-09-02 morning nightly run (0d old) · full report → run

Speed — evaltime · prefill · decode

Δ metric device main → PR
🔴 +8.1% inceptionv3
evaltime · pass_mt
beaglev-ahead 2.28 s → 2.46 s
🔴 +5.5% en_tdnn_8M
evaltime · pulse_240ms
orangepi-rv2 38.5 ms/pulse
0.16 RTF → 40.6 ms/pulse
0.169 RTF

Improvements

Δ metric device main → PR
🟢 -6.7% trunet
evaltime · pulse1_f16
orangepi-rv2 7.31 ms/pulse
0.731 RTF → 6.82 ms/pulse
0.682 RTF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant