Skip to content

SKEEP-008: Precision and encoding conversion (Draft) - #1434

Merged
michalharakal merged 1 commit into
developfrom
feature/skeep-008-precision-and-encoding-conversion
Oct 21, 2026
Merged

michalharakal merged 1 commit into
developfrom
feature/skeep-008-precision-and-encoding-conversion

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Adds SKEEP-008: Precision and encoding conversion at Status: Draft. Tracking issue: #1433.

Covers the two stub areas the op-coverage inventory (#1370) left without an issue, because both change public API semantics:

  • Mixed-precision DSL. dense<TLayer>() ×2 and stage<TStage>() are TODO() in both DSL implementations, and they can't be implemented as declared: an interface method's type parameter can't be reified, so there's no KClass for the layer. Proposal: take the dtype as a value (dense(64, dtype = FP16)) behind one PrecisionBoundary module built on the existing TensorOps.convert, which is already traced and lowers to stablehlo.convert. Inference first; convert becomes @Diff in a later phase.
  • TensorStorage.repackTo throws for every encoding change. Proposal: repackTo stays lossless (packed → dense, narrow → wide dense), and a new, explicitly lossy requantizeTo reuses Requantizers, so it accepts exactly what loader quantize-at-load accepts.
  • Retires the unused MixedPrecisionModule / InternalMixedPrecisionModule / MixedPrecisionTensorOps scaffold. Nothing subclasses or implements it.

Docs only, plus the config/stub-allowlist.txt reason now pointing at SKEEP-008 / #1433. Registered in nav.adoc and the Current Proposals table.

Open questions for review are in the proposal: reified sugar, cast-pair elision, where requantizeTo should live, and DTypePolicy metadata on boundaries.

🤖 Generated with Claude Code

Proposal for the mixed-precision DSL stubs (dense<TLayer>/stage<TStage>,
six TODO()s in NetworkBuilder.kt) and TensorStorage.repackTo, which
throws for every encoding change. The DSL takes the dtype as a value
behind one PrecisionBoundary module built on TensorOps.convert;
repackTo stays lossless and a new requantizeTo does the lossy direction
through Requantizers. The unused MixedPrecisionModule scaffold is
retired. Tracking issue #1433; the stub allowlist now points at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michalharakal michalharakal added the skeep SKEEP proposal tracking issue (durable design record) label Oct 21, 2026
@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-1434 artifact to view the complete documentation locally.

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

@michalharakal
michalharakal merged commit e9e2a51 into develop Oct 21, 2026
19 checks passed
@michalharakal
michalharakal deleted the feature/skeep-008-precision-and-encoding-conversion branch October 21, 2026 13:15
michalharakal added a commit that referenced this pull request Oct 21, 2026
CHANGELOG [0.62.1] - 2026-10-21 over everything develop holds since
0.62.0: the FFM Q8_0/Q4_0/Q5_0/Q5_1 binding fix (#1436) as the headline,
the YOLO move-out (#1437), the StableHLO softmax axis and logSoftmax fixes,
the compile-flexibility explanation (#1432) and the SKEEP-008 draft (#1434).
VERSION_NAME, CITATION, Antora version, README bom coordinate, What's New
and contributors, Android tutorial coordinates; regenerated operator and
kernel-support matrices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skeep SKEEP proposal tracking issue (durable design record)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants