Repository navigation
perf(tp2): hand pending snapshot captures the MTP execution lock - #13
Closed
LostVector wants to merge 1 commit into
Closed
LostVector wants to merge 1 commit into
LostVector wants to merge 1 commit into
Conversation
This was referenced Oct 30, 2026
LostVector
marked this pull request as ready for review
October 31, 2026 02:37
LostVector
force-pushed
the
perf/tp-mtp-snapshot-handoff
branch
from
November 4, 2026 20:42
b6d4cba to
d39f8b7
Compare
neuhaus
added a commit
that referenced
this pull request
Nov 4, 2026
# Conflicts: # CMakeLists.txt # cmake/Checks.cmake
Owner
|
Thanks |
Owner
|
This code has landed, sorry it doesn't credit you properly. Thanks again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Rebase for current RDMA review
Rebased the same scheduling patch onto
rdmaat3198893dasd39f8b79. The only conflict resolution moves test registration into the current non-Windows CMake sections; production changes are unchanged. Fresh CPU gate, TP executor, control and disk-store tests, gate ASan/UBSan and repository formatting pass. The measurements above remain historical evidence from their stated revisions, not new results on this rebase.The separate AR follow-up remains in #14. Its full evidence is preserved on our fork, outside these code-only PRs.
November 5 integration check
The requested rebase is superseded by the maintainer’s integration into
rdma: prerequisite #13 is included through mergea7fa41d6and the AR follow-up throughf070a179. The AR range-diff is identical; gate/test files match our review head. No duplicate patch was pushed or PR closed. Fresh validation of integratedf070a179: gate, TP executor, control and disk-store CPU tests pass; gate ASan/UBSan and repository formatting pass. This is a code/integration check, not a new two-node performance measurement.