From 3b4b6f6952c344173b1ec4a0ac163dd6e1fa5a25 Mon Sep 17 00:00:00 2001 From: michalharakal Date: Sun, 20 Sep 2026 15:13:24 +0200 Subject: [PATCH 1/7] docs(changelog): 0.56.0 entry --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06a6324c..09ae6572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.** @@ -15,6 +26,13 @@ `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 and `qs` 6.16.0 in the JS/Wasm dependency graph. +- 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 From 98ba6770e85e391f36a64966bc3070451740f3e0 Mon Sep 17 00:00:00 2001 From: michalharakal Date: Sun, 20 Sep 2026 15:13:24 +0200 Subject: [PATCH 2/7] docs(readme): 0.56.0 highlights and BOM coordinate --- README.md | 49 +++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 865d2f97..f2df1213 100644 --- a/README.md +++ b/README.md @@ -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") @@ -308,26 +308,24 @@ val withoutLabel = dataPipeline() --- -## 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. @@ -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) From b9d38a4994dd2d1180d2e125578f4032a14fbb81 Mon Sep 17 00:00:00 2001 From: michalharakal Date: Sun, 20 Sep 2026 15:13:24 +0200 Subject: [PATCH 3/7] docs: bump version references to 0.56.0 --- docs/antora.yml | 2 +- .../android-classifier-getting-started.adoc | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/antora.yml b/docs/antora.yml index 2af15377..8fd8ea3c 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -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 diff --git a/docs/modules/ROOT/pages/tutorials/android-classifier-getting-started.adoc b/docs/modules/ROOT/pages/tutorials/android-classifier-getting-started.adoc index 13c26f73..a72c911e 100644 --- a/docs/modules/ROOT/pages/tutorials/android-classifier-getting-started.adoc +++ b/docs/modules/ROOT/pages/tutorials/android-classifier-getting-started.adoc @@ -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) } ---- From 7efb8bd49e6b4abd82d4515e63c4927637dd4288 Mon Sep 17 00:00:00 2001 From: michalharakal Date: Sun, 20 Sep 2026 15:13:24 +0200 Subject: [PATCH 4/7] release: 0.56.0 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d54aa31e..66fc22f0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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/ From 094634a4c45eb2cb53290e86ab2e9ac3aba42406 Mon Sep 17 00:00:00 2001 From: michalharakal Date: Sun, 20 Sep 2026 15:14:12 +0200 Subject: [PATCH 5/7] docs: regenerate operator and kernel matrices at 0.56.0 --- docs/modules/ROOT/pages/reference/kernel-support-matrix.adoc | 2 +- .../modules/ROOT/pages/reference/operators/generated/index.adoc | 2 +- docs/modules/ROOT/pages/reference/ops-status-matrix.adoc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/pages/reference/kernel-support-matrix.adoc b/docs/modules/ROOT/pages/reference/kernel-support-matrix.adoc index d6e96796..9055b935 100644 --- a/docs/modules/ROOT/pages/reference/kernel-support-matrix.adoc +++ b/docs/modules/ROOT/pages/reference/kernel-support-matrix.adoc @@ -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). diff --git a/docs/modules/ROOT/pages/reference/operators/generated/index.adoc b/docs/modules/ROOT/pages/reference/operators/generated/index.adoc index 0700d23c..6bcf540a 100644 --- a/docs/modules/ROOT/pages/reference/operators/generated/index.adoc +++ b/docs/modules/ROOT/pages/reference/operators/generated/index.adoc @@ -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 diff --git a/docs/modules/ROOT/pages/reference/ops-status-matrix.adoc b/docs/modules/ROOT/pages/reference/ops-status-matrix.adoc index 8a456f69..3b9ae8fe 100644 --- a/docs/modules/ROOT/pages/reference/ops-status-matrix.adoc +++ b/docs/modules/ROOT/pages/reference/ops-status-matrix.adoc @@ -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"). From bb966d1303d3b7ea2a4716ed4c9ab6a8eae3fda1 Mon Sep 17 00:00:00 2001 From: michalharakal Date: Sun, 20 Sep 2026 18:11:02 +0200 Subject: [PATCH 6/7] docs(changelog): js-yaml pin and npm ci docs toolchain in 0.56.0 --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09ae6572..4d77cc91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,11 @@ Version note: 0.55.0 is skipped so the engine and SKaiNET-transformers share a v - **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 and `qs` 6.16.0 in the JS/Wasm dependency graph. +- **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); 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 From c78b2aa93fbe6fdc235b0c1f4330063a8c561ec9 Mon Sep 17 00:00:00 2001 From: michalharakal Date: Sun, 20 Sep 2026 18:29:01 +0200 Subject: [PATCH 7/7] docs(changelog): docs image js-yaml override in 0.56.0 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d77cc91..a790c7f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,8 @@ Version note: 0.55.0 is skipped so the engine and SKaiNET-transformers share a v 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); the docs preview job no longer downloads an unpinned npm package. + 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