Repository navigation
Write Qwen3.5 output in bounded chunks - #4296
Conversation
|
The ATC overlap retry returned an incomplete result. Limits: |
2b8db80 to
ddff720
Compare
ddff720 to
bb21321
Compare
|
I trial-merged
This adds macOS host coverage for the clean trial merge. I did not run a multi-GiB checkpoint export or the full host suite. Igor Lessio - AIFLOW LABS |
|
Thanks for the bounded-write fix, @joshuaswarren.
|
Review on ashhart#4296 (ashhart): writeChunked made no progress with nonempty input and a zero cap - every round wrote an empty slice and left the offset unchanged. Reject the cap before the loop (ZeroWriteCap) and add the regression: a nonempty buffer at a zero cap refuses with no bytes written; an empty buffer passes.
|
Fixed at Regression added to Gate: |
4118614 to
8276aa4
Compare
Review on ashhart#4296 (ashhart): writeChunked made no progress with nonempty input and a zero cap - every round wrote an empty slice and left the offset unchanged. Reject the cap before the loop (ZeroWriteCap) and add the regression: a nonempty buffer at a zero cap refuses with no bytes written; an empty buffer passes.
Darwin rejects a single write larger than INT_MAX. Use bounded writes for Qwen 3.5 output files. Verify with the chunked writer tests.
Remove multiline comments that fail the project lean check. The focused writer tests pass.
Review on ashhart#4296 (ashhart): writeChunked made no progress with nonempty input and a zero cap - every round wrote an empty slice and left the offset unchanged. Reject the cap before the loop (ZeroWriteCap) and add the regression: a nonempty buffer at a zero cap refuses with no bytes written; an empty buffer passes.
8276aa4 to
0ce4c1b
Compare
Review on #4296 (ashhart): writeChunked made no progress with nonempty input and a zero cap - every round wrote an empty slice and left the offset unchanged. Reject the cap before the loop (ZeroWriteCap) and add the regression: a nonempty buffer at a zero cap refuses with no bytes written; an empty buffer passes.
|
Thank you @joshuaswarren. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
What this changes
On large Qwen3.5 diagnostic output files, write in chunks of at most 256 MiB instead of issuing one oversized write. The bytes and order are preserved; this changes file output only, not inference arithmetic or GPU kernels. A review pass also made the cap a parameter, let sink and file errors pass through unflattened, and added a compile-time assertion that the production cap stays under INT_MAX.
1587c8caee631dcc97c8fbb68f4bba353353c4c5; no parent PR.atc overlap --base ashart/main --pulls 2231,2239,2260,2551 --json: the selected scan completed on 2026-11-21 with no limitations at headbb21321d7571e5fdf2b72de9f7f16659a8a51273on main1587c8caee631dcc97c8fbb68f4bba353353c4c5, and reports conflicts against the current heads of all four selected PRs. Attribution, measured read-only withgit merge-tree --write-tree: each of those heads produces the identical conflict count against bareashart/mainas against this branch (ricursive: Ripple-65B-Preview on native Metal (NVFP4 and bf16 releases) #2231: 28, qwen3-asr: host slice, the shared tower and Qwen3 schedules over a backend binding (#2105) #2239: 2, ricursive: the publisher's DFlash2 drafter for Ripple-65B (stacked on #2231) #2260: 28, CPU: Qwen3.5-2B served on the host's cores (zig build native-cpu), every operation in the kernel contract, judged against a float64 reference #2551: 10), so every conflict is inherited from those branches' staleness against main; none is introduced by this PR's delta. The qwen3-asr: host slice, the shared tower and Qwen3 schedules over a backend binding (#2105) #2239 owner (jschmied) replied that the qwen3-asr: host slice, the shared tower and Qwen3 schedules over a backend binding (#2105) #2239 heada5eaa2b2bbmerges cleanly with this branch; the pairwiseregistry_joins.zigconflict is main-side, not this delta. No reply yet from the ricursive: Ripple-65B-Preview on native Metal (NVFP4 and bf16 releases) #2231, ricursive: the publisher's DFlash2 drafter for Ripple-65B (stacked on #2231) #2260 or CPU: Qwen3.5-2B served on the host's cores (zig build native-cpu), every operation in the kernel contract, judged against a float64 reference #2551 owners; coordination comments are posted on each. Since every reported conflict is inherited rather than introduced by this delta, the PR is marked ready; coordination continues on the sibling threads. The repository-wide scan remains incomplete; the selected result does not establish repository-wide coverage.Checks on this head
bb21321d7571e5fdf2b72de9f7f16659a8a51273.python3 tools/zig/lean_check.py: base1587c8caee631dcc97c8fbb68f4bba353353c4c5had 167 findings; this head had 167;lean_new.pyreports 0 new findings.zig build test-chunked-write --summary all: 4 passed, 0 failed, 0 skipped (cached rerun at this head; the rebase changed no content of the touched files); the step's peak RSS dropped from about 675 MB to 5 MB because the cap-and-order test now injects a 64-byte cap instead of allocating the production 256 MiB. A writer-level negative control asserts a sink-refused request surfaces as the sink's own error, andwriteFileChunked's real file round-trip is unchanged.comptimeassertsmax_write_bytes < maxInt(c_int)in the module.zig build -Dfixed-cpu test-golden --summary allat this head: 5/5 steps succeeded; 324/337 corpus cases equal, 0 unexpected differences; 69/69 server goldens equal, 0 unexpected differences.git diff --checkandzig fmt --check build.zig zig: passed.zig build test test-goldenon a prior head46eb448d67f8a4741bc1a786cc1dddd8e64a3f7efailed with 27 test subprocesses, including fake-target lane-host failure messages and three golden-related hash mismatches. Standalone server goldens pass on every base/head pair since; that aggregate run stays unclassified and no GPU or device run was made.ddff720e7e169333033ed641e2f150c36c4cdd87(pre-rebase): all 9 checks passed,host-nightly-linuxandhost-nightly-macosskip on PRs. CI on exact headbb21321d7571e5fdf2b72de9f7f16659a8a51273: No-GPU run 44910204188 and format run 44910204186 queued at last check.Receipt
n/a — this is bounded diagnostic/test-file output; it does not change model inference, token generation, arithmetic, or kernels. The focused file test verifies byte-for-byte round-trip output.
zig-macos-dev-toolspassed and compiled the tools. Metal hardware was not exercised locally.Checklist
44a3529b5762,zig build test-chunked-writeexits 1 witherror: no such step: test-chunked-write(Zig 0.17.0, 2026-11-21). On this head the same step succeeds (3/3 steps; a cached rerun of the recorded 4-pass run). The tests are host-only and have no optional dependency to skip.