Skip to content

refactor(lang-core): remove BufferHandle.Aliased (#1502) - #1511

Open
michalharakal wants to merge 6 commits into
developfrom
feature/1502-remove-buffer-handle-aliased
Open

michalharakal wants to merge 6 commits into
developfrom
feature/1502-remove-buffer-handle-aliased

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Part of #1502 (second of its removals) and #932.

Stacked on #1508, #1509 and #1510: until they merge, this PR also shows their commits. Review the last commit.

BufferHandle.Aliased was deprecated in 0.49.0 when the one view mechanism landed (#1034). Removed now by maintainer decision (2026-11-11).

  • BufferHandle.Aliased, BufferHandleFactory.slice and Ownership.ALIASED are deleted, with the Aliased branches in DefaultBufferResolver and TensorStorage.describe().
  • TensorStorage.isAlias, StorageMemoryReport.isAlias and AggregateMemoryReport.aliasedCount go too: without the class they could only be false and 0.
  • Seven tests that constructed the class are deleted. The replacement, Storage.slice with Owner.Alias, keeps its own tests (StorageTest.aliasKeepsParentAliveDelegatesMutabilityAndDiesWithIt, OneViewMechanismTest).

Zero-consumer evidence: before the change, the only places in main source sets that named BufferHandle.Aliased or called BufferHandleFactory.slice were the class itself, the factory method, and two when branches that read one (BufferAccessor.kt, memory/Describe.kt); nothing constructed one. IrpaWriter mentioned it in an error message only.

Breaking change of the public API, reflected in the skainet-lang-core dump.

Checked locally: jvmTest for lang-core, io-core and io-iree-params, apiCheck, both source guards, and assemble for every target on this machine.

🤖 Generated with Claude Code

michalharakal and others added 6 commits November 11, 2026 14:20
An audit at 0.64.0 found the old storage layer still in place beside
the new one. The SKEEP goes back to Accepted and gains a status table
per acceptance criterion and per open decision, linking the issues
that track them. 003a, SKEEP-002, memory-model.adoc and the
TensorStorage KDoc lose statements that later work made untrue.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
checkTensorDataDowncasts counts downcasts to concrete TensorData
classes outside the data package against an allowlist that has to
match the code exactly: 162 sites in 21 files today. It runs in the
stub-markers CI leg.

ForwardScopeFlatMemoryTest runs 300 forward passes under a forward
scope on the JVM and asserts that direct memory, RSS and the slab
stay flat.

reference/benchmark-baseline.adoc records the JMH numbers a dispatch
or storage change is compared against; scripts/pr-gate.sh points at it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
SKEEP-003 decision 13 merged the storage-side dtype enum into DType
and deprecated it. TensorStorage and StorageMemoryReport now hold a
DType directly instead of bridging to it from the enum, and the
LogicalDType overloads of the storage factories are gone. No
production code outside the storage package used the enum.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ryTest (#1501)

RSS grew past the bound on a CI runner although nothing leaked: a JVM
commits heap lazily, so RSS follows garbage that is already dead. The
test now asserts the live heap after a collection and prints RSS.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The byte-range alias handle was deprecated when the one view
mechanism landed (#1034) and nothing in production code ever created
one. It goes with BufferHandleFactory.slice, Ownership.ALIASED and
the isAlias / aliasedCount report fields, which could only be false
and zero. Storage.slice in sk.ainet.lang.memory is the replacement.

Co-Authored-By: Claude Fable 5.2 <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-1511 artifact to view the complete documentation locally.

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

This branch has not been deployed

No deployments
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