Repository navigation
deepseek: fail fast on a lost CUDA context and on stalled engine operations - #1646
Conversation
|
Thanks for this. It's a careful series, and the host fixtures that block the real snapshot and union synchronization calls are a nice way to test it. There are a few things to change before we can take it:
Once these are in, we'll rerun our checks and take it. Thanks again for tracking these reports down. |
Address the review on ashhart#1646. The runner, follower and lane host get the progress scopes only when TF_DSV41_STALL_EXIT_S is non-zero, so the default path costs one null check per launch. Lockstep-fatal round errors reach the supervisor only when a Fate exists (TP fail-fast on); with TF_TP_FAILFAST=0 the round's requests fail and the server keeps serving, as before. LaneHost.words is a plain lookup again: a separate failure hook is called where a round or request fails, and failAll keeps the error's name for every family. A failed boot joins the supervisor before bootFailed closes the session it reads.
|
Thanks. All four are in 879f2d1:
Each change has a host test. Three of them fail with their fix reverted; the fourth (watchdog on with a Fate) is a positive control. The receipt in the description is updated. |
Own a host monitor from TP startup through model teardown so a sticky context fault reaches the existing fail-fast channel without waiting for an HTTP health poll. Readiness and admission already observe the published context fault before notification. Host regressions cover each rank, once-only notification, independent thread detection and joined shutdown. This addresses justonehe’s issue jayleaton/deepseek-v41-tensorfold-spark#31 recovery report and ilonalumina’s additional rank-specific incidents; the original kernel fault remains unqualified. (cherry picked from commit fe07080)
Address eduffd's issue jayleaton/deepseek-v41-tensorfold-spark#59 with an owned progress watchdog, default off, readiness withdrawal and fatal-error handoff. Host fixtures exercise blocked work and healthy idle or advancing work. This does not establish the cause of a GPU or distributed wedge. (cherry picked from commit 53033f7)
Complete the sticky-error fail-fast contract from justonehe and ilonalumina's issue jayleaton/deepseek-v41-tensorfold-spark#31. Notify an existing Fate directly, or exit without waiting on communicator teardown when TF_TP_FAILFAST is off. The actual model callback child test records the old synchronous abort path as status 71 and requires direct status 70 after correction; generic TP behavior is unchanged. (cherry picked from commit 5368c7a)
Address Jenpo's issue jayleaton/deepseek-v41-tensorfold-spark#38 recovery contract through an owned snapshot progress scope. The host fault fixture blocks the actual snapshot synchronization call and proves independent stall notification before partial publication, then checks a fresh synchronization. This is a bounded recovery check, not proof of the original GPU stall cause. (cherry picked from commit aee5011)
Address tanchunsiong's issue jayleaton/deepseek-v41-tensorfold-spark#64 recovery contract through an owned KV union progress scope. Exercise the actual union/glue synchronization path with a host-only blocked driver call and verify independent failure notification and unchanged tables. Distributed kernel and transport causes still require pair traces. (cherry picked from commit d6dbc87)
Address the review on ashhart#1646. The runner, follower and lane host get the progress scopes only when TF_DSV41_STALL_EXIT_S is non-zero, so the default path costs one null check per launch. Lockstep-fatal round errors reach the supervisor only when a Fate exists (TP fail-fast on); with TF_TP_FAILFAST=0 the round's requests fail and the server keeps serving, as before. LaneHost.words is a plain lookup again: a separate failure hook is called where a round or request fails, and failAll keeps the error's name for every family. A failed boot joins the supervisor before bootFailed closes the session it reads.
879f2d1 to
d7e3a7f
Compare
Address the review on #1646. The runner, follower and lane host get the progress scopes only when TF_DSV41_STALL_EXIT_S is non-zero, so the default path costs one null check per launch. Lockstep-fatal round errors reach the supervisor only when a Fate exists (TP fail-fast on); with TF_TP_FAILFAST=0 the round's requests fail and the server keeps serving, as before. LaneHost.words is a plain lookup again: a separate failure hook is called where a round or request fails, and failAll keeps the error's name for every family. A failed boot joins the supervisor before bootFailed closes the session it reads.
|
Thank you @jayleaton. This is in TensorFold 1.2.0, released today: https://github.com/ashhart/TensorFold/releases/tag/v1.2.0 It landed with your commits under your own name, so you're listed as a TensorFold contributor, and it's credited to you in the release notes and the changelog. |
What this changes
On TP=2, a sticky CUDA context fault or a wedged operation left the DeepSeek-V4.1 server up but unable to answer. Peers waited, and nothing reached the existing fail-fast channel until an HTTP health poll. This adds supervision on top of the existing Fate and fail-fast contract. Each piece is its own commit:
core/lane_activity.zig. On a stall it withdraws readiness and hands off a fatal error.TF_TP_FAILFASToff, the callback exits directly (status 70) instead of waiting on communicator teardown (the old status 71 path).LaneHost.wordsa plain lookup again, and a failed boot joins the supervisor before the session closes.Defaults:
TF_DSV41_STALL_EXIT_Sis non-zero. When it is off, the runner, the follower and the lane host get no progress pointer and no activity hooks, so a launch costs one null check.TF_TP_FAILFAST(default on) provides. There, a lockstep-fatal round error (CudaFailed,OutOfMemory,Timeout, …) takes every rank down through Fate, because the ranks cannot resynchronize after one. WithTF_TP_FAILFAST=0it is not attached: the round's requests fail and the server keeps serving, as before.The shared core gains
lane_activity: a progress scope a family can own and a failure hook. The lane host calls the hook where a round or request fails.LaneHost.wordsstays a plain lookup, andfailAllstill gives every stream the error's name. Rounds, scheduling and verification stay in the lane core as they are.Issue: none open upstream. Reported downstream by justonehe and ilonalumina, eduffd, Jenpo, and tanchunsiong (jayleaton/deepseek-v41-tensorfold-spark#31, #59, #38, #64). Stacked on: nothing (based on main
3f0a715c4; the 28 later main commits, tof350cd3ea, touch none of its files).Receipt
Environment, with the TensorFold commit, MLX or PyTorch version, machine and GPU, checkpoint and revision: head
879f2d1b4b21on main3f0a715c4; Zig 0.17.0. Host checks for the review follow-up on Linux x86_64 (no GPU); the earlier commits' host checks ran on a Linux aarch64 DGX Spark (GB10, CUDA 13.0). Real-pack boot on two GB10s, TP=2 over RoCE, checkpointjayleaton/DeepSeek-V4.1-Flash-1017-EXL3-2.8bpwrevision859396591c34,TF_EXPERIMENTAL=deepseek.Exactness: n/a; no arithmetic or token path changes, and the watchdog is off by default.
Decode speed before and after: n/a. With the watchdog off, the hot path's only addition is one null check per launch; no progress state is read or written.
Prompt speed before and after: n/a, for the same reason.
Host regressions:
CudaFailedreaches nothing. It fails with the gating reverted.explain. WithfailAll(h.words(e))restored, it fails with "a family's words".bootAbortedhas joined the supervisor before the session step. It fails with the old order.These are bounded recovery checks. They do not establish the cause of any GPU or distributed wedge.
Tests run, with pass, fail and skip counts:
test-cuda-hostnote: under a loaded build runner,keepalive_testsometimes ended early. It failed in 4 of 8 head runs, all early in the session; the last four passed, and the same binary passed 871/871 run alone. It failed in 0 of 3 runs onc2c0108d3. The test ends through serve's shutdown path, which exits when client connections are still open after 2 s, and this PR does not change that path.earlier commits, at c2c0108 (DGX Spark):
Real-pack TP=2 boot of main + every PR in this series (and the DeepSeek image path that is not yet proposed), at
83ba53298924: passed. Both ranks reached readiness; the recipe smoke, the canary and a strict tool call passed;MissingTritonVariant0 in both rank logs; 2048 greedy tokens in 51.1 s withtoken_sha2567538b20557b1…, the same as the downstream build of this series. The boot runs with the context monitor in place.Not run, and why: Metal (it compiles only
lane_activity; the host tests are CUDA-family); injecting a real GPU fault.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Not measured for this change alone.)SUMMARYline is in the receipt. (No kernel changes.)