Skip to content

P7: the loader consults the resolved allocation (plan→load wiring) - #1154

Merged
michalharakal merged 1 commit into
feature/1143-allocation-resolverfrom
feature/1144-plan-load-wiring
Aug 26, 2026
Merged

michalharakal merged 1 commit into
feature/1143-allocation-resolverfrom
feature/1144-plan-load-wiring

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Closes #1144 (parent #1133). Stacked on #1153.

Plan → load, wired. Plan and load were two disjoint pipelines sharing vocabulary and never talking: nothing on the load path consulted what the resolvers decided.

  • StreamingGgufParametersLoader gains weightFormFor: ((tensorName) -> WeightForm?)? — per-tensor forms, with the precedence order explicit and documented: your function > uniform weightForm > the three legacy parameters. The user-wins channel is named as such — whatever you pass outranks every resolver, including the deliberately blunt WeightForm(DequantizeTo(FP32), residency = HEAP) ("everything dense, on the managed heap"). Default null is byte-identical; per-tensor forms get the same validation the uniform form had.
  • ResolvedGguf.resolve(...) ties the pipelines together: header-only planInput, forms resolved from file × PlannerProfile × KernelCapabilities, overrides applied, and a loader that delivers exactly those forms. The same resolved input is priceable (profiledPlan(available).requireFits() refuses pre-load, M2-F6) and explainable (explainPlacements() — one line per weight, where it lands and why) before a byte of payload is read. A strict profile refuses at resolve time.
  • Tests: uniform weightFormFor ≡ single-form path bit-identically; per-tensor forms honoured per tensor (one weight dequantized, its neighbour kept packed); resolver→loader obedience; override-outranks-resolver; strict refusal; plan prices the resolved (dense) bytes.

Full pr-gate green (all legs).

🤖 Generated with Claude Code

…iring

Plan and load were two disjoint pipelines sharing vocabulary and never
talking: nothing on the load path consulted what the resolvers decided.

StreamingGgufParametersLoader gains weightFormFor — per-tensor forms
with an explicit, documented precedence: your function > the uniform
weightForm > the three legacy parameters. The user-wins channel is
named as such: whatever you pass outranks every resolver, including
'everything dense on the managed heap'.

ResolvedGguf ties it together: header-only planInput, forms resolved
from file × profile × kernel capability, overrides applied, and a
loader that delivers exactly those forms. The same resolved input is
priceable (profiledPlan().requireFits() refuses pre-load) and
explainable (explainPlacements() — one line per weight, where and why)
before a byte of payload is read.

Closes #1144.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@michalharakal
michalharakal merged commit a0e2c52 into feature/1143-allocation-resolver Aug 26, 2026
1 check passed
@michalharakal
michalharakal deleted the feature/1144-plan-load-wiring branch August 26, 2026 08:56
michalharakal added a commit that referenced this pull request Aug 26, 2026
…ad-wiring

P7: AllocationResolver + plan→load wiring (re-land #1153/#1154 onto develop)
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.

1 participant