Repository navigation
server: TENSORFOLD_PARALLEL sets the default --parallel when the flag is absent - #3685
Conversation
0aa7cfd to
8667d95
Compare
|
The promised live receipts, on GB10 (Nemotron 3.5 Lightning 30B NVFP4, the branch's own binary):
Note: this head was re-cut onto current |
|
Thanks @bikepresentball, this is the right fix for #3684, and the "flag wins, variable is the default" order is what we want. A few things before it can land:
If you'd rather we finish these, say so and we'll push the changes to your branch with your authorship kept.
|
|
All five are in, at the branch head (de19cb8):
|
de19cb8 to
e3d5cc4
Compare
|
Thanks @bikepresentball, and for the receipts on each case. Three of the five asks are resolved at this head:
Still open:
|
e3d5cc4 to
0c43a37
Compare
…limit) The parallel_named field's comment folds onto its line and the --parallel branch sets both fields in one destructuring assignment; no behaviour change.
…omments are one line)
…art#3685 review: no direct getenv) main.zig took the raw value with sys.getenv, which the lean rule refuses for a setting; environment.Process.get reads the same value. The lean count is back to main's 221.
|
Thanks @bikepresentball. We finished the last items on top of your three commits, which are kept as they are:
The environment test, the server CPU tests and the release-path check pass on the result. Thanks for the fix.
|
0c43a37 to
6dafebb
Compare
…limit) The parallel_named field's comment folds onto its line and the --parallel branch sets both fields in one destructuring assignment; no behaviour change.
…omments are one line)
…art#3685 review: no direct getenv) main.zig took the raw value with sys.getenv, which the lean rule refuses for a setting; environment.Process.get reads the same value. The lean count is back to main's 221.
|
The trial merge of With those resolutions applied to Rechecked the conflict resolution at Igor Lessio - AIFLOW LABS |
9afa8e5 to
3f8f405
Compare
…limit) The parallel_named field's comment folds onto its line and the --parallel branch sets both fields in one destructuring assignment; no behaviour change.
…omments are one line)
…art#3685 review: no direct getenv) main.zig took the raw value with sys.getenv, which the lean rule refuses for a setting; environment.Process.get reads the same value. The lean count is back to main's 221.
…limit) The parallel_named field's comment folds onto its line and the --parallel branch sets both fields in one destructuring assignment; no behaviour change.
…omments are one line)
…art#3685 review: no direct getenv) main.zig took the raw value with sys.getenv, which the lean rule refuses for a setting; environment.Process.get reads the same value. The lean count is back to main's 221.
3f8f405 to
058f070
Compare
|
Merged
Environment suite on the merged tree: all 29 tests pass ( |
The value is registered in platform/environment.zig (new .parallel kind: auto or 1 to 4096), so a value outside the forms is refused by name at startup with the bad value escaped, instead of clamped. main applies the environment's text as the default lanes only when --parallel is absent, through environment.parallel(flag, raw) in the module's device() shape, and cli.parse's other callers (benchmark client, fake server) never see the setting. Tests: unset, set, flag wins, blank default, refusals.
…artup check A setting the flag supersedes is not a setting, so the startup refusal skips TENSORFOLD_PARALLEL when --parallel is on the command line, as a flag-named TF_CUDA_DEVICE already does.
…limit) The parallel_named field's comment folds onto its line and the --parallel branch sets both fields in one destructuring assignment; no behaviour change.
…omments are one line)
…art#3685 review: no direct getenv) main.zig took the raw value with sys.getenv, which the lean rule refuses for a setting; environment.Process.get reads the same value. The lean count is back to main's 221.
94427e9 to
e1ed31f
Compare
The parallel_named field's comment folds onto its line and the --parallel branch sets both fields in one destructuring assignment; no behaviour change.
…review: no direct getenv) main.zig took the raw value with sys.getenv, which the lean rule refuses for a setting; environment.Process.get reads the same value. The lean count is back to main's 221.
|
Thank you @bikepresentball. 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. |
…riables The app's Engine variables page accepts only names in `capabilities --json`'s env list, and TENSORFOLD_PARALLEL -- honoured by serve since #3685 when --parallel is absent -- was never declared, so the app refused it (#3684). The audit found fifteen more variables the server reads for serving that were likewise missing, all registered common-scope rules or documented serve-side switches: TENSORFOLD_VIDEO_TOKENS, TENSORFOLD_PREFIX_WAIT_MS, TENSORFOLD_PRESSURE_CACHE_PERCENT, the three restore-prefetch names, TF_CACHE_EVICT, TF_SHARED_PRICE_LOG, TF_STARTUP_RECEIPT, TENSORFOLD_LOG_TIME, TENSORFOLD_TOOL_GRAMMAR (and its TF_DSV41_TOOL_GRAMMAR alias), TF_GLM_WORLD, TF_GLM_CLEAR_THINKING, TF_DSV41_SCHEMA_PROMPT and TF_SLIDE_TAKE_OUT_CHECK. A capability-audit host test now pins that every common-scope rule and each of serve's direct reads is declared. No behaviour change beyond the list.
…riables The app's Engine variables page accepts only names in `capabilities --json`'s env list, and TENSORFOLD_PARALLEL -- honoured by serve since #3685 when --parallel is absent -- was never declared, so the app refused it (#3684). The audit found fifteen more variables the server reads for serving that were likewise missing, all registered common-scope rules or documented serve-side switches: TENSORFOLD_VIDEO_TOKENS, TENSORFOLD_PREFIX_WAIT_MS, TENSORFOLD_PRESSURE_CACHE_PERCENT, the three restore-prefetch names, TF_CACHE_EVICT, TF_SHARED_PRICE_LOG, TF_STARTUP_RECEIPT, TENSORFOLD_LOG_TIME, TENSORFOLD_TOOL_GRAMMAR (and its TF_DSV41_TOOL_GRAMMAR alias), TF_GLM_WORLD, TF_GLM_CLEAR_THINKING, TF_DSV41_SCHEMA_PROMPT and TF_SLIDE_TAKE_OUT_CHECK. A capability-audit host test now pins that every common-scope rule and each of serve's direct reads is declared. No behaviour change beyond the list.
…riables The app's Engine variables page accepts only names in `capabilities --json`'s env list, and TENSORFOLD_PARALLEL -- honoured by serve since #3685 when --parallel is absent -- was never declared, so the app refused it (#3684). The audit found fifteen more variables the server reads for serving that were likewise missing, all registered common-scope rules or documented serve-side switches: TENSORFOLD_VIDEO_TOKENS, TENSORFOLD_PREFIX_WAIT_MS, TENSORFOLD_PRESSURE_CACHE_PERCENT, the three restore-prefetch names, TF_CACHE_EVICT, TF_SHARED_PRICE_LOG, TF_STARTUP_RECEIPT, TENSORFOLD_LOG_TIME, TENSORFOLD_TOOL_GRAMMAR (and its TF_DSV41_TOOL_GRAMMAR alias), TF_GLM_WORLD, TF_GLM_CLEAR_THINKING, TF_DSV41_SCHEMA_PROMPT and TF_SLIDE_TAKE_OUT_CHECK. A capability-audit host test now pins that every common-scope rule and each of serve's direct reads is declared. No behaviour change beyond the list.
For #3684: a desktop or wrapper launch that passes no
--parallelcan now be configured by environment, without the UI.What it does
tensorfold servereadsTENSORFOLD_PARALLELonly when--parallelis not on the command line, so the flag wins and every existing launch keeps its meaning. The value takes the same forms as the flag: a whole number 1 through 4096, orauto(8). A blank value keeps the default. A malformed value is refused at startup with the variable, the supplied text and the accepted forms, in the house style of the environment validation table.Verification
TENSORFOLD_PARALLEL=4: the server opens with 4 lanes (the value flows through the sameparallel()parse as the flag, so caps and clamping are shared).TENSORFOLD_PARALLEL=4: the flag's value is used, the environment stays out of the way.TENSORFOLD_PARALLEL=abc: refused at startup, naming the variable.Notes
docs/environment.mdgains the variable's row.zig/src/server/cli.zigstays at the 600-line cap (one existing helper condensed to hold it).