Repository navigation
test(cuda): opt-in --jobs and --shard for kernel-contract - #3093
BlivionIaG wants to merge 1 commit into
Conversation
|
Thanks for this. It's a careful change, and the default path is untouched. We read it closely and found no way for a sharded run to report green when a serial run wouldn't. A crashed, killed or silent shard, an exit its counts don't explain, and a list run more or less than once all fail the merged run. Per-kernel seeds come from kernel names, so shards test the same inputs as a serial run. On our side A few asks before we run it on hardware:
On overlaps: #2620 adds a standalone suite to Once these are in and your numbers are posted, we'll run serial against
|
Shards split kernels, standalone suites and launch records; the parent merges each child's TALLY line into one SUMMARY.
9486f3d to
210d696
Compare
|
Thanks. Pushed
The full unfiltered |
|
Full unfiltered
The body is updated; it no longer says this revision is unmeasured. |
What this changes
tf-cuda-test kernel-contractruns serially, and a full run takes hours. This adds two opt-in ways to run it faster:--jobs Nruns the gates in N child processes and prints one mergedSUMMARY, and--shard K/Nruns one slice of them. The default run and the existing name filter are unchanged; the filter and--jobsare separate switches and compose (filter first, then shard).6c5cef8941b27d86b06a986834e13deb9b515e1e.atc overlap --json: against main, incomplete (API limits: my pull requests, other pull requests, files, time). Textual conflicts with two open pull requests, neither agreed: qwen3_5 cuda: the GDN kernels read the state, its rollback copy and the log through a stream's state table (#2444 P3) #2620 inzig/tests/cuda/contract_after.zig, and CUDA: #1764's BF16 prompt tile for Qwen ModelOpt, Nemotron and Dory, plus two exact Qwen prompt kernels (#1762) #2008 inzig/tests/cuda/contract_limits.zig. Both are registration-sized hunks; I will rebase on whichever lands first.Checks on this head
210d696b7bbd428dbc9768dd918fdd5641f2a981.python3 tools/pr_check.py --base 6c5cef8941b27d86b06a986834e13deb9b515e1e: exit 0, 0 errors; lean 345 vs 345 on main, 0 new.zig fmt --checkclean. Cross-compile of the CUDA test runner for Linux x86_64 and aarch64: exit 0.zig build test-contract-shard-host, 16 of 16 shard tests and 2 of 2 process tests pass, no GPU (the Linux-only parent-death test ran in a Linux VM) (partition covers each index once; filter then shard keeps each named kernel once; merged tallies equal the serial tally; tally lines round-trip and malformed ones are refused; merging refuses a missing, repeated or double-run shard; a crashed or silent shard fails the merge; memory, integrated-GPU, mixed-GPU and argument refusals, each naming the value).Receipt
Main against branch: n/a for inference. The runner change was measured by running the same command serially and with
--jobs 2on one machine.Boxes it reaches: the CUDA kernel-contract runner only.
New switch?
--jobs Nand--shard K/N [--device D]on the runner command line, off by default;--helpprints both with the per-process memory plan. No environment variable.Environment: Zig 0.17.0, nvcc 13.4, two 16 GB sm_120 GPUs, 64 threads, about 125 GiB free host memory. The filtered serial and
--jobs 2rows below come from an earlier revision of this change (same sharding and merge logic; it still printed timing lines, since removed) merged onto a Flash Next EXL3 branch; the unfiltered--jobs 4run is on this head.Paths and platforms the change reaches: the Linux CUDA runner. Which I ran: the two commands below. Which I could not: other chips.
Exactness: the merged
SUMMARYcounts equal the serial run's. Same commands, same binary, filtered toexl3 flashnext:--jobs 2The limit problems are pre-existing and equal in both runs. The gates time is the slowest shard's (494 s serial, 276 s with two shards).
Full unfiltered run with
--jobs 4on this exact head (built from210d696b7bbd, whose parent is the main in "Stacked on"; the change touches no kernel), two 16 GB sm_120 GPUs, 125 GiB or more of free host memory, one run: wall 1:02:36 (/usr/bin/time -v),SUMMARY 625 kernels: 625 pass gates 1-4, 0 fail, 8 known findings; 410 controls: 410 red as planted, 0 missed; 546 limit problems. The runner exits 1 because of the limit problems, as the serial run does. I did not run main separately; the limit problems come from the kernels and limits main registers, not from this change./procandnvidia-smi): shard 0/4 17.2 GiB peak RSS, 1956 MiB peak GPU; 1/4 6.6 GiB, 5650 MiB; 2/4 8.5 GiB, 5648 MiB; 3/4 13.9 GiB, 2164 MiB. All children summed at one instant: peak 24.0 GiB; lowest host MemAvailable 126.2 GiB. Each GPU's device memory peaked at about 5.8 GiB of 16.632 / 421 / 564on that head; the counts differ from this head's because the trees differ). I have not run serial unfiltered on this head, so the 3.2 h to 1.04 h comparison is across heads.Decode speed, prompt speed: n/a, the change cannot reach inference.
Licence of any new weights or drafter: n/a.
Checklist