Repository navigation
flashnext: refuse a malformed TF_FLASHNEXT_* setting by name before device work - #2585
Conversation
|
Heads-up, same as #2380: GitHub has not created workflow runs for this fork's PR yet (the repository's run-approval queue, I believe). The branch is ready whenever you clear it; local evidence is in the receipt, and the all-prompt main-against-branch token A/B for the profile rows follows on the GB10. |
|
Also for the queue: |
|
Correction to my note above: no workflow runs were created because the PR's |
e490f7d to
9073d84
Compare
|
@devopsfortunato thanks, this reads well. Every value main took as on stays on or is refused by name, never flipped to off, and the tests pin the word forms. A few asks:
On the CHANGELOG: no rebase needed; we settle it at landing. |
|
Thanks, @ashhart. Working on all three now. One question on 1: on #2619 you asked for |
9073d84 to
5dec73c
Compare
…k text means no page test (ashhart#2585)
…e for a Flash Next checkpoint (ashhart#2585)
|
All three asks are in on
On Local, besides CI: |
ccfc668 to
0367afb
Compare
…k text means no page test (ashhart#2585)
…e for a Flash Next checkpoint (ashhart#2585)
|
All three are in, @ashhart, head
Checks on On the CHANGELOG: the branch has one |
|
@devopsfortunato thanks, all three are in:
Optional: do |
|
Both description touches are in: head line now reads six commits on base On the optional question: no. |
…k text means no page test (#2585)
…e for a Flash Next checkpoint (#2585)
…n tests (#2585) A source-order test fails if cuda_lanes_load.open stops validating the environment first, and one host test per reader sets TF_FLASHNEXT_KV_PAGE_TEST and TF_FLASHNEXT_KEEP_LATE to blank text and expects 0 pages and nothing late.
|
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. |
#2585 (dfd9ac5) put `try @import("env_validate.zig").startup();` at the top of the learn, prompt and compare mains. Each of those executables also imports the flashnext module, whose cuda_lanes_load.zig imports the same file, so Zig refuses the build: "file exists in modules 'root' and 'flashnext'". The nightly's compile-flashnext-learn (test-host-ci-linux- compile) failed on it; flashnext-prompt and flashnext-compare fail the same way but no CI step compiles them. cuda_launch.zig (the flashnext module's root) now exports env_validate, and the three mains call flash.env_validate.startup(), so the file belongs to the one module. The check itself and its place before any device work are unchanged.
test-gradient-serving pins the bytes of the maintained serving kernels and launch wrappers; it stopped at the first changed file, cublaslt.zig, but fourteen differed: - #2585 (dfd9ac5, 52479d3) reads TF_FLASHNEXT_* through platform/environment.zig and refuses malformed text at startup; valid values keep their meaning (ten Flash Next files). - c274b45 on this branch takes that startup check through the flashnext module (cuda_launch.zig and the prompt and compare mains). - #2285 (52375ee) adds cuBLASLt layout and algo-config entries for Qwen3 embeddings to cublaslt.zig; existing entries are unchanged. - #2205 (c8ad987) lets tp_group.zig's RoCE gathers run at any world up to roce.max_world when every rank asks (TF_ROCE's default is unchanged), and #2789 (61a2651) ends a call failing after abort as Aborted. Each row takes its file's new hash, with the change named beside it.
Figures and scope corrected to the PRs (#2948, #2863, #2934, #2933, #2921, #2906, #2878, #2892, #2851, #2728, #3072, #2915, #2864, #2854 and others), promises of later work removed (#2903, #2875, #1630, #1720), #3074 and #3047/#3046 said as their PRs scope them, the duplicate #2861, #2585, #2321 and #2719 entries and two copies of released 1.2.5 lines removed, #1953's line named for its PR, and a line for #3255. Released sections unchanged.
|
Thanks @devopsfortunato! This is in TensorFold 1.2.8, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.8
|
What this changes
Before: twenty-nine
TF_FLASHNEXT_*settings read their text leniently, so a typo silently became a default or the other state of a switch. After: they register inplatform/environment.zig's table under a newflashnextscope and read through the shared parser. Unset and blank keep the default, a valid value keeps its meaning, and any other text stops the start with the name, the text and the accepted forms.On the served CUDA path the scope is checked in the server's startup refusal (
native/cuda_refusal.zig,startup()) for a Flash Next checkpoint (qwen4_exp), which runs beforecuda.Driver.open()and the memory pool; the family's load paths and the prompt, compare and learn tools check it again first thing.What a user now sees refused that main accepted:
TF_FLASHNEXT_CONFIDENCE=inf,-infornan: main'sparseFloattook them as the chain's stop; the table takes a finite number only.engine_load.loadConfigured) refuses a malformed value of these settings even though they act on CUDA only: the check belongs to the family, not the backend.0/1for a switch, a sign, a fraction or junk for a count, and a word other thanrowsforTF_FLASHNEXT_PROMPT.TF_FLASHNEXT_KV_PAGE_TESTreads blank or whitespace-only text as off (it used to refuse the start), and a malformed value of it now surfaceserror.InvalidEnvironmentfrom the table instead oferror.BadFlashNextPageTest;0and an invalid size are still refused by the reader exactly as before, wherepages.validstays.TF_FLASHNEXT_KEEP_LATEused to read as asked for (anything but0did), refusing a checkpoint where the late keep doesn't fit; now blank leaves it to the loader.No value main took as on is read as off: it stays on or is refused by name.
main(f03e5aac1, rebased; the code conflict was additive: main'sgemma4,drama3and GLM rows stay besideflashnext).TF_FLASHNEXT_KV_PAGES(the profile-registry name) is left to flashnext: blank TF_FLASHNEXT_KV_PAGES reads as unset #2619, where it goes throughprofile.given; this PR takesTF_FLASHNEXT_KV_PAGE_TEST.atc overlap --json: the changed files meet other open pull requests only inCHANGELOG.md.Checks on this head
c5ab63740(6commits on basef03e5aac1: the change, its changelog line,TF_FLASHNEXT_KV_PAGE_TESTin the table, the server's startup check for a Flash Next checkpoint, the page test's title, and the coverage skip's comment).zig build test— the local full suite hung on one test binary under load on this 4-core host and was stopped, so CI carries it;zig build test-environment-host—zig build test-environment-host3/3 steps, all tests passed (the step's own count is in the build summary).zig fmt --check build.zig zig— exit 0.lean_check.py—zig build test-environment-hostgreen;lean_check.py345 problems against main's 386, 0 new (the only flagged line this branch adds is the pre-existing presence-onlyTF_FLASHNEXT_DRAFTSread in the MTP check tool, which main flags too).contract_controls.cuunchanged here; the tools cover the row counts: the table holds 29flashnextrows (20 switches, 7 counts, 1 real, 1 word) andenvironment_flashnext_test.zigasserts that grouping.c5ab63740: 8 checks passed, 2 nightly-only skipped (No GPU,Zig formatand the rest); the branch merges cleanly intomainReceipt
n/a for inference: the change is parsing and startup validation of environment text. No kernel, lane round, prompt byte or numerical path changes; every valid value keeps its meaning, clamps included (
DRAFTSkeeps its 1..15 clamp,WINDOW_ROWSits cap,KV_PAGE_TESTitspages.valid).main@f03e5aac1+ this branch, Zig 0.17.0, aarch64 Linux, no GPU.Checklist