Skip to content

P7/P8: device placement and graph-level memory planning #1131

Description

@michalharakal

Split out of #932's closing summary, where this was recorded as post-M2 but never given an issue.

The SKEEP-003 proposal's phases 7 and 8 were always scoped after M2, and the storage model was built so they could land without another rewrite:

  • P7 — device placement. 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.
  • P8 — graph-level planning. MemoryPlan is arithmetic over a tensor list; it does not know the shape of the computation, so it cannot reuse a buffer whose live range has ended or size the forward slab from actual liveness rather than a worst-case formula.

Why this is a research issue, not a coding one

Both need a decision about where the information comes from. The eager path has no graph to analyse — by construction, it executes as it is called. The recorded path (RecordingExecution → HloGenerator → StableHLO → IREE) does, and IREE already performs its own allocation planning, so P8 may be less "build a planner" than "stop duplicating one".

Worth establishing before designing: what the recorded path already gives us, and whether P7/P8 are wanted for the eager path at all.

Depends on

Nothing blocking. The storage model (#932) landed the types both phases need.

Activity

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

    @michalharakal
    ContributorAuthor

    All three research questions answered and the eager-scope implementation landed — see SKEEP-003a (docs/modules/skeep/pages/003a-placement-and-planning-resolution.adoc, #1149) for the full record.

    P7 — placement (#1133): resolver-owned. AllocationResolver decides from (resolved form × profile × platform); the MemoryPlan.kt hardcode is gone; the loader consults the resolution (ResolvedGguf); the user outranks the resolver through a documented precedence chain; explain() makes every decision printable pre-load. The annotations and the dead planner that pretended to own this are deleted.

    Eager lifetime (#1135): the Scope split is the mechanism; memoryScope is wired into creation, opt-in, with steady-state zero-allocation decode pinned by test. Adoption of op outputs: #1146.

    P8 — graph planning (#1134): would duplicate IREE; core decides and carries; carriage (#1147) gated on the .vmfb parity harness (#1148).

    Follow-ups #1146/#1147/#1148 carry the remaining engineering; none of them blocks this umbrella. Legacy loader axes removal (#1159) is in flight as the first slice of façade removal.

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