Repository navigation
perf(tp2): hand pending snapshot captures the MTP execution lock - #1
LostVector wants to merge 1 commit into
Conversation
|
Superseded by the maintained The current Linux HIP release passed fresh TP=2 inference, cache/cancellation, persisted-cache restart and injected failure/recovery checks. The integration PR retains the original measurement attribution and timing caveats; these checks do not create a new performance claim for this historical patch. Closing this historical draft as superseded, not claiming a formal GitHub merge. Its source branch and evidence remain intact. Fork |
An MTP decode loop can repeatedly reacquire
TpExecutor::call_mutex_while another request's prompt-snapshot capture waits. That delays the second request's admission into a decode batch: one unchanged-policy trace recorded a 2,421 ms capture lock wait followed by only 1.234 ms inside capture.Register pending snapshot captures before acquiring the existing recursive mutex. Multi-token and batched decode calls yield outside that mutex until registered captures acquire it. In-flight calls finish normally; prefill ordering and recursive fallback behavior stay unchanged. This is a bounded snapshot handoff, not a global FIFO scheduler. No new runtime setting or model arithmetic change.
Validation
0b6978aaand candidateb6d4cbaacompleted with matching normalized compiler commands. A clean-build B/C/B integration check matched all 39 outputs and expected cache/prefill work. Aggregate C2 throughput was 59.12 / 66.75 / 47.51 tok/s; maximum stream gap was 2,544 / 138 / 2,541 ms. This small check is supporting evidence, not the confidence estimate below.Configuration: two 128 GB Strix Halo hosts, Flash Next UD-Q4_K_XL with shared-Q8_0 MTP, context capacity 65,536, two sessions, chunk 2,048, cache RAM 1 GiB, two 20 Gb/s USB4 links. Timing scope excludes model loading; driver and toolchain were held fixed within each comparison. The confidence runs used our experimental GPU build profile; the separate clean-build check above must not be conflated with those eight paired blocks.
Draft qualification limits
Fair progress can make the first-arriving request finish later: median first-request wall time increased about 121 ms (17/24 waves slower). This patch improves admission and combined throughput, not every request's latency. The confidence experiment retains 108 strict request/phase timing flags; the clean-build check retains 31. These are not averaged away or represented as a complete timing qualification. No default deployment or broad model-performance claim is requested yet.
This targets the RDMA branch because
gufo-org/gufo:maindoes not containtp_executor.cpp; the original distributed integration is tracked in gufo-org#296. The independent cache-retention change is outside this diff.Related drafts