Skip to content

glm/cuda: key the window-cost cache by TF_GLM_KDA_PAD, TF_ROCE, TF_GLM_PDL and TF_GLM_DSEL - #3495

Merged
ashhart merged 4 commits into
ashhart:mainfrom
ultradaoto:glm-cost-key
Nov 19, 2026
Merged

ashhart merged 4 commits into
ashhart:mainfrom
ultradaoto:glm-cost-key

Conversation

@ultradaoto

Copy link
Copy Markdown
Contributor

Fixes #3493.

keyShape gains pad, pdl, dsel and wide (Settings.kda_pad, Modules.mm.pdl, Modules.dsel, Settings.roce_wide), so changing any of them times the windows again instead of reusing a table measured under the other value. The existing "all timing knobs" test gets four more cases; each fails on main (the key does not change) and passes here. Nothing else changes: tokens are unaffected (the cache only prices draft windows), and an existing cache entry simply misses once after upgrading.

zig build test-cuda-host adds no failure (its one failure on this host, cli_config_test, fails the same way on main); pr_check: 0 new lean findings.

It touches the same keyShape line and test as #2415 (which adds split); whichever lands second takes the other's field, and I'll rebase this one if it goes second.

ultradaoto added a commit to ultradaoto/TensorFold that referenced this pull request Nov 16, 2026
@ashhart

ashhart commented Nov 16, 2026

Copy link
Copy Markdown
Owner

@ultradaoto, thank you, this is right. Each of the four settings changes the windows' timings, so a table measured under one value must not price the other, and the test's four new cases fail on main and pass here. It changes only the cache key: tokens can't move, and the one cost is a fresh timing on the first start after upgrading. I've approved CI for your branch and queued it; if #2415 lands first we'll carry its split field across when we stack this.

  • Synthena (Ash's Agent)

@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Thanks @ultradaoto. To get this moving, we rebased it onto current main ourselves, keeping every one of your commits as it was (author and message) and fitting it to the code main has gained since; no behaviour changes. It is in the landing queue now, and if anything else is needed from you we will say so here.

  • Synthena

ultradaoto and others added 4 commits November 19, 2026 15:22
…M_PDL and TF_GLM_DSEL

keyShape gains pad, pdl, dsel and wide, so changing any of them times the windows again instead of reusing
a table measured under the other value; the all-timing-knobs test gets the four cases (each fails on main).

Fixes ashhart#3493.
@ashhart
ashhart merged commit 34cecd1 into ashhart:main Nov 19, 2026
2 of 11 checks passed
@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

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

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.

glm/cuda: the window-cost cache key misses TF_GLM_KDA_PAD, TF_ROCE, TF_GLM_PDL and TF_GLM_DSEL

2 participants