Repository navigation
Conversation
… own doorbell Startup gathered every rank's settings but compared only ranks 0 and 1, and took the kept-prompt budget from those two alone, so on four ranks a mismatched rank 2 or 3 started anyway and the cache could exceed what a later rank had room for. Every rank is now checked against rank 0 (the error names each mismatched rank) and the budget is the least across all ranks. The idle doorbell rang one store key per request that every follower deleted after waiting, so on more than two ranks a fast follower could delete it before a slower one began to wait, and that follower missed the request. The leader now sets one key per follower, which only that follower deletes; rank 1 keeps the existing key name, so two-rank behaviour is unchanged.
…3 experts Checked ash hart PRs open+closed (read-only). Direct hits on our problems, all OPEN, branch BHCC2025/TensorFold exl3-cuda-experts: - ashhart#741 EXL3 routed experts behind experts.Grouped: gate+up+SwiGLU ONE kernel, down on pair rows, each expert's rows rotated by its own suh INLINE (register-resident rot for 1-2 pair chunks - the problem we had deemed impossible tile-incrementally). Rides on grouped.zig's Plan (in our tree). 297cu+124zig lines, with an exactness test harness (tf-cuda-test exl3-experts) - 367,872 values within FP64 bounds, alone==grouped byte-equal. - ashhart#740 EXL3 projections behind qlinear (the stacked base). - ashhart#718 branch-free trellis window extraction (perf). - ashhart#729 share decoded weights across prefill rows (perf). - ashhart#728 MiMo-V2.6 CUDA EXL3 two-GPU (another full CUDA EXL3 family). - ashhart#765 GLM CUDA multi-rank doorbells; ashhart#770/777/768 nemotron CUDA single-launch shared rounds + batched MTP drafting (patterns for our later concurrency work). PLAN: vendored exl3_experts.cu/.zig + exl3.cuh into our tree (this commit, unwired). Next: build wiring (fatbin + mod), port moeBlock to Grouped.decode with the router->plan plumbing from grouped.zig, run their exl3-experts test on our checkpoint, parity, bench. Our own grouped kernels (stage-1 parity) stay as fallback.
|
A TP=4 GPU data point from a related implementation, rather than this PR: I tested the Its doorbell uses the same key naming and per-follower set/delete design. Startup agreement uses For the single-rank overrides, I used the launcher's DRY_RUN commands and inserted one additional Docker
The mixed-budget run matched the all-8-GiB control. This is indirect evidence for sizing to the limiting rank, rather than a direct measurement of the agreed kept-prompt budget: the run used With rank 3 at 8 GiB, six requests completed in 0.18–0.27 s. The first was sent immediately after the startup check; the remaining five followed idle gaps of 5, 10, 15, 20 and 25 s. This is a TP=4 smoke test consistent with the per-follower doorbell design. I did not trace each follower's wakeup or deliberately delay a follower. It does not exercise this PR's |
|
Hello @Kurcide, Thank you for agree(rows) and the per-follower doorbell. Above two ranks, startup compared only rank 0 with rank 1. Budgets of 100, 100, 10 and 20 MiB kept 100 MiB. agree compares every rank with rank 0 and keeps the smallest budget. One shared key, tf_glm_request_{n}, let a fast follower delete a slower one's wakeup. The leader now sets one key per follower. Rank 1 keeps the old name. Your CPU tests pin the budget, a mismatch on rank 2 or 3, and four ranks that still wake. Those three cases are the bar we keep. This cannot merge. The Python engine is frozen, and no Python pull request merges any more. The native home is #593, once GLM CUDA serves more than two ranks. Please say so there before a native pull request. You are welcome back with those two checks. Thank you again. |
Two coordination gaps in the GLM CUDA engine that show up only above two ranks (e.g.
--tp 4).1. Startup agreement checked only ranks 0 and 1.
GlmEngine.__init__all-gathers every rank's settings row, but compared onlyboth[0]withboth[1]and took the kept-prompt budget asmin(both[0][-1], both[1][-1]). A rank 2 or 3 started with different flags (draft model, context,TF_GLM_*) went through unnoticed. Kept-prompt caches could also be sized above what a later rank reported room for (budgets[100, 100, 10, 20]MiB gave 100 MiB instead of 10).Fix: a small
agree(rows)helper compares every rank with rank 0, raises the existing "different settings" error naming each mismatched rank, and returns the smallest budget across all ranks.2. The idle doorbell could lose a wakeup.
_ringset one store key per request,tf_glm_request_{n}, and every follower deleted that key after its wait. With more than one follower, a fast follower could wait and delete the key before a slower follower started waiting. The slower follower then blocked on a key that no longer existed.Fix: the leader sets one key per follower (
bell_key(rank, n)), and only that follower deletes it. Rank 1 keeps the existingtf_glm_request_{n}name, so two-rank behaviour and the existing tests are unchanged.Tests (CPU only, no GPU needed)
tests/test_glm_rank_agreement.py(new): budgets[100, 100, 10, 20]agree on 10; a settings mismatch on rank 1, 2 or 3 is refused and the error names that rank.tests/test_glm_idle_bell.py: four ranks on an in-memory store, with ranks 1 and 3 consuming their wakeups before rank 2 waits. Every follower wakes for each request and no key is left behind. Before the fix this fails with the lost wakeup. The new agreement test fails before the fix because the helper does not exist yet.pytest tests/cuda tests/test_cuda_*.py tests/test_glm*.pyon CPU PyTorch 2.14: 1233 passed, 31 skipped, 5 failed. The same 5 tests fail without this change: 4 intest_cuda_geometrybecause triton is missing, and 1 lock test intest_cuda_build.Not run: GPU or multi-rank hardware. The change touches only startup agreement and the store doorbell, not kernels or arithmetic, so decode output and speed are unaffected.