Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

## [Unreleased]

## [0.56.0] - 2026-09-20

Headline: **grouped-query attention is native to the engine, and the compiled leg of SKEEP-005 lands —
structure at compile time, cores at run time.** `scaledDotProductAttention` takes K/V with their own head
count, so model code no longer tiles K/V up to the query heads before attention — not eagerly, not on
the tape, and not in the exported StableHLO. Graph execution contexts now run under the schedule of the
ops they wrap.

Version note: 0.55.0 is skipped so the engine and SKaiNET-transformers share a version line again
(transformers 0.55.0 was a transformers-only release against engine 0.54.0).

### Added

- **SKEEP-005 phase 2 — the compiled leg: structure at compile time, cores at run time.**
Expand All @@ -15,6 +26,18 @@
`DefaultGraphExecutionContext` answers `schedule`/`withSchedule` from the ops it wraps, so the
JVM `ComputeGraphExecutor` runs under the caller's schedule. Key decision and diagram in SKEEP-005.

### Changed

- **SDPA shape validation follows the grouped-query contract**: Q heads must be a positive multiple of
the K/V head count (K and V must still agree). Callers that tiled K/V upstream keep working unchanged.
- **Security pins**: `fast-uri` 3.1.6, `qs` 6.16.0 and `js-yaml` 4.3.2 (GHSA-2883-xcg3-v3hh) in the
JS/Wasm build-tooling graph.
- **Docs toolchain installed with `npm ci`**: the docs image declares its Antora inputs in
`docs/.docker/package.json` with a committed `package-lock.json` (every transitive package pinned by
integrity hash, `js-yaml` overridden to 4.3.2); the docs preview job no longer downloads an unpinned
npm package.
- Dependency bumps: kotest 6.2.5, kotlinx-benchmark 0.5.0, binary-compatibility-validator.

## [0.54.0] - 2026-09-06

Headline: **every `ExecutionContext` gets a `Schedule` — and the CI run that exercised it found a
Expand Down
49 changes: 23 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Add the core dependencies (Gradle Kotlin DSL):
```kotlin
dependencies {
// Recommended: import the umbrella BOM and drop versions on the engine modules.
implementation(platform("sk.ainet:skainet-bom:0.54.0"))
implementation(platform("sk.ainet:skainet-bom:0.56.0"))

implementation("sk.ainet.core:skainet-lang-core")
implementation("sk.ainet.core:skainet-backend-cpu")
Expand Down Expand Up @@ -308,26 +308,24 @@ val withoutLabel = dataPipeline<RawDataset>()

---

## What's New in 0.54.0

Structured concurrency lands as a first-class citizen — and the CI run that exercised it found a
real deadlock:

- **`Schedule` on every `ExecutionContext`** (SKEEP-005) — `sk.ainet.context.schedule.Schedule`
splits *what* an op computes from *how its independent chunks spread across cores*.
`scaledDotProductAttention` is the first scheduled op, `parallelChunks` no longer hides a
`runBlocking(Dispatchers.Default)` island, and the JVM `CoroutineSchedule.hardware()` default
spreads chunks across cores while `Schedule.Sequential` keeps every kernel single-threaded.
- **A real deadlock, found by turning scheduling on** — `CoroutineSchedule.forRange`'s region
waited on children the pool had no thread left to run, once every worker was itself inside a
region; it looked like the OOM hang a first CI fix assumed. A region is now a shared chunk
queue, so a caller can always finish its own region alone, whatever the pool is doing.
- **`tensorFilter` on the single-file `SafeTensorsParametersLoader`** — parity with the sharded
loader; lets a family load selectively from a checkpoint that carries tensors the requested
dtype can't accept.
- **`ExperimentalMemoryApi` opt-in gate removed** — SKEEP-003's M0–M2 shipped complete back in
0.49.0, so `Storage`, `Scope`, `Format`, `TensorView`, `WeightForm`, and the rest of
`sk.ainet.lang.memory` no longer need `@OptIn`.
## What's New in 0.56.0

Grouped-query attention becomes native to the engine, and the compiled leg of SKEEP-005 lands:

- **Grouped-query `scaledDotProductAttention`** — K/V arrive with their own head count
(`[b, nKV, Sk, hd]`); query head `h` reads K/V head `h / (H / nKV)`. Bit-identical to before when
`nKV == H`, and to the old tiled form otherwise. Model code no longer expands K/V heads before
attention — not eagerly, not on the tape.
- **Leaner StableHLO for GQA models** — attention lowers with the head groups as a batching
dimension, so exports carry no broadcast or concatenate of K/V.
- **Structure at compile time, cores at run time** — `ScheduleAnnotationPass` stamps structural
defaults (`parallel_dims = [batch, heads]` on every attention); an explicit `parallelism` is
advisory and a default can never carry a core count.
- **Graph contexts honour the schedule of their ops** — the new `ScheduledOps` seam lets
`DefaultGraphExecutionContext` answer `schedule`/`withSchedule` from the ops it wraps, so the JVM
`ComputeGraphExecutor` runs under the caller's schedule.

0.55.0 is skipped so the engine and SKaiNET-transformers share a version line again.

See [CHANGELOG.md](CHANGELOG.md) for full release notes, including every prior release.

Expand All @@ -353,12 +351,11 @@ We love contributions! Whether it's a new operator, documentation, or a bug fix:

Browse the full codebase documentation on [DeepWiki](https://deepwiki.com/SKaiNET-developers/SKaiNET).

### Contributors (0.54.0)
### Contributors (0.56.0)

- **Michal Harakal** ([@michalharakal](https://github.com/michalharakal)) — the SKEEP-005
structured-concurrency Schedule API, the coroutine-pool deadlock it uncovered on CI and its
shared-chunk-queue fix, `SafeTensorsParametersLoader` `tensorFilter` parity, and retiring the
`ExperimentalMemoryApi` opt-in gate now that SKEEP-003 has shipped
- **Michal Harakal** ([@michalharakal](https://github.com/michalharakal)) — grouped-query-native
`scaledDotProductAttention` and its StableHLO lowering, structural schedule defaults, and
schedule-aware graph execution contexts (SKEEP-005 phase 2)

### Contributors (0.53.0)

Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ asciidoc:
framework_name: SKaiNET
# Current SKaiNET release — bump once per release; referenced as
# {skainet_version} in dependency snippets (blocks need subs="attributes+").
skainet_version: 0.54.0
skainet_version: 0.56.0
ksp_version: 2.2.21-2.0.5
dokka_version: 2.1.0
asciidoctorj_version: 3.0.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Kernel × platform support matrix
:description: Which compute-kernel provider serves each weight format on each KMP target.

Generated from `kernel-support.json` (version `0.54.0`) by `KernelSupportMatrixTest` — registry introspection of the registered `KernelProvider` implementations. Do not edit by hand; run `./gradlew generateKernelMatrix` to refresh.
Generated from `kernel-support.json` (version `0.56.0`) by `KernelSupportMatrixTest` — registry introspection of the registered `KernelProvider` implementations. Do not edit by hand; run `./gradlew generateKernelMatrix` to refresh.

Each cell is the best (highest-priority) provider that serves `Float32 × format` `matmul` on that platform: *native-ffm* (100) → *panama-vector* (50) → *scalar* (0). An empty cell (`—`) means no provider carries a kernel there (the format is dequant-to-FP32 only).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= AI-NET Operators Reference

Generated from version `0.54.0` on 2026-09-06
Generated from version `0.56.0` on 2026-09-20

== Operators by Modality

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/reference/ops-status-matrix.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Operator Coverage Matrix
:description: Cross-backend status for every operator function in SKaiNET.

Generated from `operators.json` version `0.54.0` on 2026-09-06.
Generated from `operators.json` version `0.56.0` on 2026-09-20.

Rows are `Operator.function` pairs. The `Validated` column shows whether the function's documentation has been DARC-validated by a reviewer (see xref:contributing/darc-workflow.adoc[DARC workflow]). Remaining columns are backends that appear in any function's `statusByBackend` map — a missing entry means the backend makes no claim about the function (treat it as "unknown", not "not supported").

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ An Android project with Kotlin. Add the SKaiNET modules:
[source,kotlin]
----
dependencies {
implementation("sk.ainet.core:skainet-lang-core:0.54.0") // tensors, DSL, training
implementation("sk.ainet.core:skainet-backend-cpu:0.54.0") // CPU ops
implementation("sk.ainet.core:skainet-compile-dag:0.54.0") // autograd (training context)
implementation("sk.ainet.core:skainet-data-api:0.54.0") // Dataset / DataBatch
implementation("sk.ainet.core:skainet-data-simple:0.54.0") // embedded Iris
runtimeOnly("sk.ainet.core:skainet-backend-jni-cpu:0.54.0") // NEON kernels (see below)
implementation("sk.ainet.core:skainet-lang-core:0.56.0") // tensors, DSL, training
implementation("sk.ainet.core:skainet-backend-cpu:0.56.0") // CPU ops
implementation("sk.ainet.core:skainet-compile-dag:0.56.0") // autograd (training context)
implementation("sk.ainet.core:skainet-data-api:0.56.0") // Dataset / DataBatch
implementation("sk.ainet.core:skainet-data-simple:0.56.0") // embedded Iris
runtimeOnly("sk.ainet.core:skainet-backend-jni-cpu:0.56.0") // NEON kernels (see below)
}
----

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=sk.ainet.core
VERSION_NAME=0.54.0
VERSION_NAME=0.56.0
POM_DESCRIPTION=SKaiNET

POM_URL=https://github.com/SKaiNET-developers/skainet/
Expand Down
Loading