Skip to content

feat(flashnext): read the chunk settings through the startup parser - #3591

Merged
ashhart merged 2 commits into
ashhart:mainfrom
devopsfortunato:flashnext-chunk-startup-parser
Nov 17, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
devopsfortunato:flashnext-chunk-startup-parser

Conversation

@devopsfortunato

Copy link
Copy Markdown
Contributor

What this changes

Flash Next's two chunk settings were read with a bare parseInt in the family: a malformed value failed with an unnamed BadChunk, and an empty or whitespace-only value was refused instead of reading as unset. TF_FLASHNEXT_CHUNK and TF_FLASHNEXT_CHUNK_SOLO now register as rules in platform/environment.zig's table and are read through the shared startup parser, so a malformed value stops the load naming the variable, the supplied text and the accepted forms, and empty or whitespace-only text reads as unset like every other setting. Valid values and all defaults are unchanged; the one behavior change is empty-as-unset. The cross-setting rule (a solo chunk below the chunk TF_FLASHNEXT_CHUNK resolves to) stays in the family and its refusal names that setting.

Checks on this head

  • Head commit: 86835ae52
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: base 221, head 221, 0 new (tools/pr_check.py --base 6bc82acac).
  • Tests run, with the command and pass, fail and skip counts:
    • New tests red before the change (2 expected missing-row failures), green after: fresh parser run 24/24; zig build test-environment-host -j2 success.
    • zig build -Dfixed-cpu test-cuda-host -j2: 136/136 passed in the final rerun (an earlier concurrent full-suite run had 1 fail in cuda_disk_test, which passes in isolation here — labeled contention flaky, unrelated subsystem).
    • Full native suite zig build -Dfixed-cpu test test-kernel-contract test-golden test-gradient-serving test-qwen-serving-host test-server-security test-pull-security fuzz-cortheon -j2 --test-timeout 10m: 8391/8462 passed, 70 skipped, 1 failed (the same cuda_disk_test, rerun green alone above). test-kernel-contract 172/172, test-gradient-serving 1/1 with the repinned manifest.
    • Root pytest -q: 511 passed, 93 skipped, 2 failed — tools/zig/zig_cache_restat_test.py both timing out at its 300 s zig build budget: this board (4-core ARM, mmc storage) needs ~8m50s for a cold hello-world zig build with the test's fully-cold local+global cache, so these two cannot pass locally on hardware grounds; they are exercised unchanged in CI.
    • zig fmt --check build.zig zig, git diff --check: clean.
  • CI: pending on this head; will watch.
  • Not run, and why: any GPU/device receipt (maintainer confirmed in Flash Next CUDA: validate chunk settings through the shared startup parser #3308 no device run is needed — the change cannot reach inference without a GPU).

Receipt

n/a — host-side environment parsing only; this change cannot reach inference without a GPU (confirmed in #3308).

  • Main against branch: n/a, no GPU on this host.
  • Boxes it reaches: none directly; Flash Next on CUDA engine load path.
  • New switch? No new setting: both settings already existed; they now validate through the shared parser. Defaults unchanged (TF_FLASHNEXT_CHUNK 1536; TF_FLASHNEXT_CHUNK_SOLO unset = larger of the chunk and 8192 alone at --parallel 1, else off).
  • Environment, with the TensorFold commit, Zig and backend toolchain, machine and GPU, checkpoint and revision: TensorFold 6bc82acac, Zig 0.17.0, host ARM (no GPU), no checkpoint (host tests only).
  • Paths and platforms the change reaches, which I ran and which you could not: Flash Next CUDA load path; ran host tests for the parser, the family loader refusal (before resources), and the full native host suite; no device run, per the maintainer's confirmation.
  • Exactness, from tools/bench_concurrent.py --alone --serial or token_sha against "draft": false: n/a, no inference path on this host.
  • Main against this branch, same machine and checkpoint, posted before asking for a run on our machines: n/a, same reason.
  • Decode speed before and after, from tools/bench_openai.py: n/a.
  • Prompt speed before and after: n/a (no GPU).
  • Licence of any new weights or drafter, or "n/a": n/a.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

@devopsfortunato
devopsfortunato marked this pull request as ready for review November 16, 2026 19:30
@ashhart

ashhart commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Thanks @devopsfortunato. Both chunk settings now go through the startup table with the same bounds and defaults, so a blank value reads as unset and a bad one is refused at startup by name. Naming the solo-below-busy mistake is a nice touch. CI is green at 86835ae523, and the change stays out of the kernels, so host tests cover it and it needs no device run.

Nothing more is needed from you. It's in our landing queue, and when it lands we'll add #3591 beside #3308 on the changelog line.

  • Synthena

@ashhart
ashhart force-pushed the flashnext-chunk-startup-parser branch from 86835ae to d1a0d30 Compare November 16, 2026 23:59
@ashhart
ashhart merged commit 25de9d7 into ashhart:main Nov 17, 2026
2 of 11 checks passed
@ashhart

ashhart commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Thank you @devopsfortunato. 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.

@ashhart

ashhart commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Landed as 25de9d7, thank you @devopsfortunato. Your commit is in as you wrote it, with #3591 added beside #3308 on its changelog line, and you'll be credited in the release notes.

  • Synthena

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flash Next CUDA: validate chunk settings through the shared startup parser

2 participants