Skip to content

P7: delete the dead placement machinery - #1152

Merged
michalharakal merged 1 commit into
developfrom
feature/1142-delete-dead-placement
Aug 26, 2026
Merged

michalharakal merged 1 commit into
developfrom
feature/1142-delete-dead-placement

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Closes #1142 (parent #1133).

First slice of the P7 placement answer: delete the machinery that pretended to decide placement but was consumer-free.

  • tensor.storage.MemoryPlanner + ResolvedPlacement + PlacementUnavailableException — its only "consumer" was ExecutionContext.memoryPlanner, a property that constructed a fresh instance per read and was itself read by nothing; the name collided with the live sk.ainet.lang.memory.plan.* planner.
  • StorageSpec — deprecated, zero callers.
  • @Place/@Weights — zero consumers; the KDoc claim that "the MemoryPlanner reads these annotations" was false. @KvCache/@KvCacheBypass are consumed and stay; the file is now KvCacheAnnotations.kt.
  • Placement.residency + the Residency enum — the single non-test read sat on deprecated StorageSpec.toAllocationSpec(). Lifetime is ScopeKind; weight staging is WeightForm.WeightResidency. Placement itself stays (live via the KV cache stores).

API dumps updated (lang-core, backend-cpu, compile-dag). Full pr-gate green: jvmTest, apiCheck, JS/Wasm (run with -Pkotlin.incremental.js.ir=false — the JS-IR incremental cache glitch reappears even from fresh caches), linuxX64Test, assemble, Java consumer tests, tool tests, Android host tests.

The replacement decision-maker (AllocationResolver, #1143) lands next.

🤖 Generated with Claude Code

The @Place/@Weights annotations were read by nothing — the KDoc claim
that "the MemoryPlanner reads these annotations" was false. The
tensor.storage.MemoryPlanner itself had one consumer: an
ExecutionContext property that built a fresh instance on every read
and was itself never read. StorageSpec was deprecated with no callers.
Placement.Residency's single non-test read sat on that deprecated path.

All of these answered the placement question at the wrong site, and
SKEEP-003 already scheduled them for deletion. Lifetime stays with
ScopeKind, weight staging with WeightForm.WeightResidency; the
replacement decision-maker (AllocationResolver) lands separately.

Placement itself stays — the KV cache stores carry it — as do
@KvCache/@KvCacheBypass, which moved to KvCacheAnnotations.kt.

Closes #1142.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-1152 artifact to view the complete documentation locally.

This comment will be updated automatically when the PR is updated.

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.

P7: delete the dead placement machinery (@Place/@Weights, old MemoryPlanner, StorageSpec, Placement.Residency)

1 participant