Skip to content

Instantly share code, notes, and snippets.

View cwschroeder's full-sized avatar

Christian Schröder cwschroeder

  • IB SCHROEDER
  • Richard-Wagner-Str. 40, 93133 Burglengenfeld
View GitHub Profile
@cwschroeder
cwschroeder / README.md
Created October 17, 2026 17:15
TensorFold PR1004 source/CPU review: pinned WebP fixtures, loader refusals and allocator/cut controls

Source/CPU review of PR #1004 commit cf989a396287f932eaaf89621c6a420fa582c54e above main 6ee828c24bf802cdd73507d6fc60bb27a82c0d66. No material source defect was established in the loader, RIFF bounds, allocation cleanup, orientation/white-alpha finishing or server-format wiring.

With the existing local libwebpdecoder reporting version 0x010600 (1.6.0), all 16 picture tests pass in Zig 0.17.0 Debug and Fast. All eight WebP fixture outcomes execute: six RGB/dimension matches and two refusals, including alpha and EXIF orientation 6. JPEG pixel subcases are excluded because the local JPEG library does not match its separate pin. This checks the submitted Pillow 13 reference table; an independent Pillow 13 oracle was not rebuilt.

Three loader controls pass in separate processes: an explicit missing path, a synthetic library reporting 1.6.1, and a synthetic library missing required functions. The latter two libraries contain no decoder. Two more CPU tests cover either Zig output allocation failing, all 12,582 pre

@cwschroeder
cwschroeder / README.md
Created October 17, 2026 16:38
TensorFold593 CPU check: native GLM ceiling3 still allows adaptive lane draft depth

The native CUDA GLM facts at main 6ee828c24bf802cdd73507d6fc60bb27a82c0d66 set engine.max_drafts=3. Host.serve passes those facts into the lane Config and Rule. With GLM's empty family-cost table, Rule.depth chooses from the stream's acceptance estimate; the ceiling is not a fixed-depth control.

This CPU probe imports the actual depth.zig. With most_drafts=3 and synthetic first-depth acceptance0.85/0.60/0.95, it returns2/1/3. One test passes on Zig0.17.0. It does not run a model or establish the cause of a hardware timing difference, and does not inspect the author's unpublished fixed@3 control.

flowchart LR
 F[GLM facts: at most 3 drafts] --> R[Shared Rule.depth]
 R --> P[Stream acceptance estimate]
 P --> D[Select 1, 2 or 3 drafts]
@cwschroeder
cwschroeder / README.md
Last active October 17, 2026 16:32
TensorFold1003 CPU counterexample: mixed specialization can defeat constexpr1 preference under a single-guard fallback

CPU selection-order probe for issue #1003, pinned main 6ee828c24bf802cdd73507d6fc60bb27a82c0d66 (Zig 0.17.0). This is a counterexample to a proposed single-guard relaxation, not a finding against the author's unpublished fork.

The stated preference is to choose a captured constexpr-1 variant ahead of a runtime-1 fallback. The existing two-pass search has an interaction with other arguments' specialization:

Candidate order R P Exact pass for R=1, P=0x1000
A, runtime i32, not div16 div16 pointer rejects runtime R=1
B, constexpr-one constexpr 1 pointer without div16 assumption rejects because the launch pointer is aligned

On current main, the general pass skips A and selects B. If the runtime-one guard changes from if (!p.nospec and x == 1) return false; to if (fit == .exact and !p.nospec and x == 1) return false;, the general pass accepts A first. B exists but loses the requested preference.

@cwschroeder
cwschroeder / README.md
Created October 17, 2026 16:14
TensorFold PR1002 shared-expert overlap: scoped source/CPU review and pinned receipt audit

Source/CPU review of PR #1002, only c6004831 and 14c78e73 above ed44eefbaefdfc6b52c0740ac9aeda3bbc5a36ba. The stack's earlier #996/#999 increments are outside this review.

No material source defect was established in the two-commit pass. The shared plan's member/item/count regions fit and remain separate for 1 to 16 rows at one or two owned shares. The actual new cuda_state test and config.test_0 pass on the CPU. Local Zig 0.17.0 whole-tree format and whitespace checks pass; the safe aarch64 Linux CUDA-driver/CLI cross-build completes 12/12 steps, without NVCC/fatbins and without executing those binaries.

The source uses separate shared/routed activations, NVFP4 row sections and output regions. The fixed shared plans do not write the main plan's scratch while the side stream runs. TP keeps one stream; workers use the dynamic plan. Ordering checked in source:

flowchart LR
 A["Main: input rows ready"] --> F["Record fork"]
 F --> R["Main: router, routed experts, latent output"]
@cwschroeder
cwschroeder / README.md
Created October 17, 2026 15:55
TensorFold GLM native memory accounting and full-arena snapshots: pinned source and CPU probe

Source/CPU interpretation of the native GLM memory report in TensorFold issue #993. Release source 833bbfcba9109bb38c7af7303f80da0ca12b213c and current main 6ee828c24bf802cdd73507d6fc60bb27a82c0d66 have identical bytes in the eight accounting, engine, weight and snapshot files listed in source-manifest.json. This does not authenticate the reporter's installed binary or checkpoint.

The preflight uses safetensors file sizes multiplied by the largest axis share. The startup model column instead uses TensorFold's tracked DeviceBuffer-byte delta across family open. GLM opens its first sequence and forward/MTP workspaces during that call, then declares one free stream because it is already allocated. The reported 102.61 GiB therefore includes the first roughly 9.53 GiB arena. Subtracting the two rounded values leaves approximately 93.08 GiB of other tracked allocations, including weights and scratch, rather than a pure-weight measurement. Eight requested streams need seven extra arenas, consistent with the roughly

@cwschroeder
cwschroeder / README.md
Created October 17, 2026 15:45
TensorFold replay gate: CPU missing-ID false-pass repro and bounded fix at 2b5d7d70

CPU review of the replay comparison gate at ecohash-co/TensorFold branch dsv41-replay-harness, commit 2b5d7d706ddc0f6578ac0b58d787af67cc042b38.

Finding: pair() compares only IDs present in both files. When A has one matching short case plus a long-bucket case absent from B, compare --gate reports PASS and omits the long bucket entirely. An explicit error for that same ID correctly fails, so an interrupted or incomplete candidate file can pass where a recorded timeout cannot. The published gate help says missing results should fail.

The patch compares the union of IDs and supplies an error row for either missing side. Existing complete comparisons and recorded-error handling keep their behavior. The added CLI tests use synthetic local JSONL files and never contact a server. On the base, the two existing-behavior cases pass and four regressions fail: three false passes and one disjoint-ID case that exits without reporting missing buckets. After the fix all six pass.

Apply replay-missing-ids.patch to the pinn

@cwschroeder
cwschroeder / README.md
Created October 17, 2026 14:43
TensorFold PR636: HCA verbs-load diagnostic fix, patch and host-only evidence

HCA diagnostics for verbs load failures

Patch on upstream PR #636 at 46161ac46a4448e4b7179fba84e3554537a43319, ending at 8f75a6aa22c9c71d1342bbf0d914a67ae3a5318e.

When Verbs.open fails, the selector currently discards that error and HCA reports NoRoceDevice. The patch keeps LibraryUnavailable or MissingSymbol through the existing port exchange. If no devices were selected, HCA reports the load failure and points to the RDMA userspace installation. Explicit lists still work as before. resolve() and wire code are unchanged; device/port query diagnostics are outside this slice.

  • Negative control: exactly two behavioral failures, expected LibraryUnavailable/MissingSymbol but found NoRoceDevice; 1460 passed, 8 skipped.
  • Candidate CI: whole host suite, kernel contract, goldens, fuzzing and lean gate passed. All six current-head checks are green.
  • Three new host regr
@cwschroeder
cwschroeder / README.md
Created October 17, 2026 14:13
TensorFold PR636: validate runner commands before session startup, patch and host-only evidence

TP runner command validation

Patch on upstream PR #636 at 46161ac46a4448e4b7179fba84e3554537a43319, ending at 602a0fd4e1d621cf0715d01a2b466497dc3b4bb7.

Unknown commands, incorrect arity, unknown failfast modes and invalid numeric arguments now return 2 with usage before Config.fromEnv, CUDA or Session.open. Defaults remain N=50 and absent HOLD=0; explicitly supplied HOLD=0 still triggers the existing host-only guard. The repository's runner scripts use the retained command forms.

Check Result
Test-only negative control 16 expected entry-point failures on the old dispatch; 1461/1469 unit tests passed, 8 skipped
Candidate Linux CI Whole zig build test, test-kernel-contract, test-golden, fuzz-cortheon and lean check passed
@cwschroeder
cwschroeder / README.md
Last active October 17, 2026 14:22
TensorFold #999: bounded source/CPU review and pinned receipt-data audit

Source/CPU review of TensorFold PR #999 at e367c8f557db6ab516c2f89a6ff6a51f232cad56 on upstream 6ee828c24bf802cdd73507d6fc60bb27a82c0d66, Zig 0.17.0.

The native Linux server, CLI and CUDA test driver compile locally; none was executed. Kernel-contract host tests pass 18/18. The combined CUDA-host/contract command has 866 pass, two skip and two server timing failures. Those two assertions also fail in the previously tested unchanged upstream base; all three HTTP benchmark source files remain byte-identical. The complete macOS Metal suite was not run. Whole-tree format and lean delta pass. All four exact-head remote CI checks pass.

The external data audit covers the 48 top-level files at receipt commit e766067f09d6c657faa9636a5b85f4ec3e8c70b6 in plotarmordev/TensorFold, receipts/nemotron/cuda-decode-kernels. It excludes all-widths/. Export those files to external/ beside audit_receipt.py and run:

python3 audit_receipt.py
@cwschroeder
cwschroeder / FOLLOWUP.md
Last active October 17, 2026 16:27
PR994 receipt consistency audits: original evidence gap and pinned cancellation rerun with27B failure

CPU receipt audit of PR #994 at ae534091d02d9cbc63f1feca84944dd661775c05. All 31 receipt files match their pinned Git blobs; all 30 SHA256SUMS entries and 27 publication digests verify. The base HTTP/model audit still passes. The 2048 synthetic IDs match the stated formula, all three added invariant/radix summaries agree with their logs, and the 35B recorded draft aggregate is 974 accepted of 1593 across 36 replies.

The cancellation follow-up does not qualify cancellation during prefill. Each model's server log reports three long prompts rejected before prefill: 20438 prompt tokens exceed context 16384, HTTP 400. The six completed requests per model are the short baselines/recovery requests. The pinned serve_cancel.py only compares the following short reply and its duration; it does not assert that the dropped request entered prefill. Its nine printed ok lines therefore do not establish nine cancellations.

Reproduce the CPU audit with all receipt files in a directory and these scripts alongside serve_check.