Skip to content

P7: decide who chooses a tensor's device placement #1133

Description

@michalharakal

Split out of #1131.

Placement and MemoryDomain exist and AllocationSpec carries them, but nothing chooses — a tensor's home is decided by whoever constructs it, not by a policy that can see the whole model.

Research question

Where should placement decisions come from: a per-model policy, the PlannerProfile, or something derived from the graph? Does this need a graph to reason about at all, or can it work over the eager construction order?

Depends on

Nothing blocking — the storage model (#932) landed the types this needs. Related to #1131's open question of whether P7 is wanted for the eager path at all, or only for the recorded path where IREE already does allocation planning.

Activity

  1. added this to the IREE milestone on Aug 25, 2026
  2. michalharakal commented on Aug 26, 2026

    @michalharakal
    ContributorAuthor

    Resolved: a resolver owns placement — AllocationResolver.resolve(weight, profile, platform), a pure function of what will be held (the resolved WeightForm) × what the profile says (domainFor) × what the platform can do (StorageCapabilities), mirroring the pattern WeightFormResolver proved. Consumers carry and obey: the plan (PlanTensor.allocation), the loader (ResolvedGguf). No graph needed — weights are per-tensor decisions, activations are a lifetime question (#1135), and with only CPU backends a device-arbitration policy would be untestable speculation.

    The user always wins: per-tensor weightFormFor > uniform weightForm > resolver; explain() renders every decision with its reason before a byte of payload is read.

    Landed via #1142 (PR #1152 — the dead machinery deleted), #1143 + #1144 (PRs #1153/#1154, re-landed as #1155). Written up in SKEEP-003a (#1149, PR #1158).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions