Richard opened D-Q4-29 by asking for background: why will the pilot take so much longer than planned? The design (negatives_run3_design.md §5.2) said 15–30 minutes a run. The executor who built it (#916) measured 12.6 seconds a step, so about 10.6 hours for a 3,000-step run, and a profile put 88% of that time in one function, rspmm_add_mul_backward_cpu. (Corrected 2026-10-30, #1131: the profile’s 34.1 s is the backward passes of its three steps, 11.4 s a step against the 12.6 s measured, so the kernel is 88% of the backward and about 79% of a step. The 0.2 s and 10 s below are the two kernels; a step’s whole forward is about 1.2 s and its whole backward about 11.4 s, about 10×.)
The function explains itself once you open it. The fused message-passing kernel folds the batch into the feature axis, so each of the pilot’s ~48,000 training edges carries 64 × 64 = 4,096 numbers through each of 6 layers. Going forward, each thread writes only its own nodes’ rows, so threads never meet, and a step’s forward costs about 0.2 seconds. Going backward, the gradient flows to each edge’s source node and to its relation’s embedding, and many threads write those at once. The CPU code takes a std::mutex around every single addition (rspmm.cpp lines 106–113): about 2.4 billion lock and unlock pairs a step. With only 8 relation types, every thread is updating the same few thousand relation-gradient cells. A step’s backward costs about 10 seconds, 50 times the forward. The GPU kernel uses hardware atomic adds instead, which is why nobody had noticed: every real training run has been on an A100.
The same lock explains #916’s other finding, that runs at 8 threads don’t reproduce. A mutex makes threads add one at a time, but not in a fixed order, and floating-point sums depend on order. At 1 thread the order is fixed, and #916 measured bit-identical weights. The 15–30 minute estimate has no derivation in the design. My guess is that it came from #726’s probes, which also ran locally on CPU, but forward only, and so never touched the slow half.
Richard then asked why CPU at all, when Run 2 used Vertex. Vertex runs whatever image VERTEX_TRAINING_IMAGE names, and the pilot’s code is on an unmerged branch. The roadmap allows two batched rebuilds in Q4, and the design wanted the pilot to decide what goes into the next one. He doesn’t remember why the cap is two either and guesses tidiness, but agreed that building the pilot into an image would be the wrong order. He asked whether the CI box could take the load off his workstation. It can’t, usefully: #851’s inventory shows a small four-core machine that both CI runners share. The pilot would run for one to two weeks there and stall every PR’s checks for that whole time.
I offered to measure two alternatives first: the old kernel at 1 thread, and the layer’s existing unfused path, which needs no kernel code and lacks the #854 deaf-node bug. Richard said no, and he was right. He had already chosen the workstation, and the pilot runs as designed, so the timing could not change anything he was deciding. The unfused path stays an unmeasured idea.
He decided D-Q4-29 with every lean: R1 B, R2/R3 B, R4 A, P0 A, and the pilot on his workstation. Then, unprompted, he raised the cloud budget from $500 a month to $1,000, approved by default, with cost still reported. October’s spend so far is $332.80 by the recorder. The charter’s §1 and §2, the roadmap’s D20 row and the Run 3 design now say so. The per-job ask is gone. (2026-11-04: a per-job line came back on 2026-10-21, toward caution.)
Where I was wrong, or nearly:
- The measurement offer. I proposed half an hour of timing on his machine before he ruled on P. A measurement earns its place only if some result could change a choice someone is actually making. By then nobody was choosing.
- A lean with an “or” in it. The card’s lean for P was “A or B”, and he accepted “all your leans”. A lean that names two options can’t be accepted wholesale. I recorded A, two runs at a time, on the strength of his “we can use my workstation; that’s fine too”, and said so on the card so he can switch. A and B differ only in how many runs share the machine, so the switch can happen between any two runs.
- A guess at the rebuild cap’s purpose. I guessed it limited per-rebuild risk and said it was a guess. His own guess is tidiness. Neither of us can find a recorded reason, so it is not a constraint worth defending.
Later: cancel only what can resume (#932)
The budget change had a second half. The charter said to cancel any job at 1.5× its estimate, and Richard did not want that: “I really don’t want to cancel anything that’s expensive if we can’t resume it later.” So a job past 1.5× now alerts him, and only one that can resume from a checkpoint may be cancelled. He set what counts as expensive and kept quiet hours as they are. Over the last 45 days foundation training was 93% of Vertex spend, and it already saved a full checkpoint every epoch. What it lacked was a way back in. Arm A’s 20→40 extension had been a warm start, with a hash check to confirm it got the same split. So #932 was built in the same session, which ran into the morning of 2026-10-13:
- A resume route.
POST /runs/{id}/resumequeues the stopped job’s own payload. The handler reuses the run’s row, its recorded split (md5-checked, never re-exported) and its output. - A new container mode.
MODE=resume_trainstarts at the checkpoint’s newepochs_completedfield, so the epoch count, checkpoint names and progress lines carry on. An image built before it exits 2 on that mode before touching GCS, so a resume fails closed until the next build. - Rolling uploads. The rolling checkpoint now uploads within 60 s of each epoch, so a job killed without its SIGTERM trap still loses at most an epoch.
- Timeouts as stops. A Vertex timeout is now recorded as a stop to resume, not a failure.
- One cost. Cost and runtime add up over every job of the run.
Two things in the code would have broken a resume quietly. The best-so-far weights lived only in the trainer’s memory. And the per-epoch checkpoint is saved before that epoch’s validation, so with in-loop validation on, no checkpoint holds the state a resume needs. The container runs with validation off, so the trainer now refuses a resume with it on rather than continue a different run. Second, a resumed job writes to the same output, and the sync loops would have copied a fresh, empty progress file over the run’s history. The job now pulls the history down first and appends to it. On CPU at one thread, a run resumed in place ends bit-identical to one that never stopped, and breaking the loop’s start epoch makes four of nine tests fail.
Where I was wrong, or nearly:
- A comment that quoted a marker. I wrote the block’s own marker,
>>> resume-seed, into the new mode’s header comment. The block tests cut the file at the first marker, so one test fed bash 39 KB of entrypoint and Windows refused the command line. A new test now requires every marker to appear exactly once. - Line endings. My re-indent script found no marker in
task_handlers.pybecause the worktree checks it out with CRLF. The script now uses the file’s own line endings.