P7: delete the dead placement machinery - #1152
Merged
Merged
Conversation
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>
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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" wasExecutionContext.memoryPlanner, a property that constructed a fresh instance per read and was itself read by nothing; the name collided with the livesk.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/@KvCacheBypassare consumed and stay; the file is nowKvCacheAnnotations.kt.Placement.residency+ theResidencyenum — the single non-test read sat on deprecatedStorageSpec.toAllocationSpec(). Lifetime isScopeKind; weight staging isWeightForm.WeightResidency.Placementitself 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