Skip to content

refactor(lang-core): remove LogicalDType (#1502) - #1510

Open
michalharakal wants to merge 5 commits into
developfrom
feature/1502-remove-logical-dtype
Open

michalharakal wants to merge 5 commits into
developfrom
feature/1502-remove-logical-dtype

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

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

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

SKEEP-003 decision 13 merged the storage-side LogicalDType enum into DType and deprecated it in 0.49.0. The removal was planned for the next major; by maintainer decision (2026-11-11) it happens now.

  • LogicalDType, LogicalDTypeBridge.kt (DType.toLogicalDType()) and their test are deleted.
  • TensorStorage took the enum as its real constructor field and computed dtype from it. It now takes dtype: DType in the same position, so the dtype-first secondary constructor is no longer needed.
  • StorageMemoryReport holds dtype; its toString() prints Float32 where it printed FLOAT32.
  • The deprecated LogicalDType overloads of TensorStorageFactory.fromRawBytes / fromRawBytesOwned / fileBacked and PackedBlockStorage.toTensorStorage are gone; toTensorStorage() keeps its no-argument form through a default of FP32.
  • 15 test files move from logicalType = LogicalDType.FLOAT32 to dtype = FP32.

Zero-consumer evidence: before the change, a search for LogicalDType, logicalType, toLogicalDType in main source sets outside sk/ainet/lang/tensor/storage matched one KDoc comment in DType.kt. After it, the only match in Kotlin sources is that comment, reworded.

This is a breaking change of the public API: the skainet-lang-core dump loses 65 lines.

Checked locally: jvmTest for lang-core, io-gguf and io-safetensors, apiCheck, checkUnmarkedStubs, checkTensorDataDowncasts, and assemble for every target on this machine.

🤖 Generated with Claude Code

michalharakal and others added 3 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>
@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-1510 artifact to view the complete documentation locally.

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

michalharakal and others added 2 commits November 11, 2026 15:31
…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>
@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-1510 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