Feature/skainet 0.40 0.39 migration kernelrace - #30
Merged
michalharakal merged 4 commits intoAug 12, 2026
Merged
Conversation
skainet-transformers hasn't caught up to the core 0.40.x line yet (tops out at 0.39.1 on Maven Central), so the version target is mixed: - Core-only samples (SinusApproximator, MNISTDemo, GloVeEmbeddings, TinyTransformer, MnistJavaDemo, skainet-ui) -> SKaiNET 0.40.1 - KllamaDemo (uses skainet-transformers) -> SKaiNET/transformers 0.39.1, the latest matched pair Every KMP build also needs Kotlin 2.3.21 -> 2.4.10, since 0.39.1 and 0.40.1 klibs both declare that floor. Along the way, sk.ainet.core:skainet-data-basic was renamed to skainet-data-simple starting at 0.36.0 (MnistJavaDemo, SinusApproximator, MNISTDemo catalogs); GloVeEmbeddings' Gradle wrapper was bumped from 9.0 to the repo-standard 9.5.1. KllamaDemo needed no source changes -- the 0.39.1 compatibility typealiases cover the 0.34.1 API surface it uses. Every sample was rebuilt and tested (JVM/wasm/js/android + relevant unit tests) against the new versions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AndroidNeonLlmDemo showed SKaiNET's hand-written ARM NEON kernels with an Android-only NEON-vs-scalar A/B race, but every other sample in this repo is Kotlin Multiplatform. This turns it into KernelRace: Android stays the focus (the race itself is inherently Android-only kernel-SPI territory), and the same engine now also runs on Desktop and in the browser as a KMP app. iOS is deferred until the multiplatform structure is proven out. - shared/: engine, model resolution and ChatViewModel are platform-neutral commonMain code with expect/actual seams per platform (LlamaRuntimeBuilder for runtime construction, ModelProvider for Android download/cache/asset vs. Desktop cache vs. Wasm's bundled-at-build-time bytes). ChatViewModel depends on a GenerativeEngine interface and an injectable dispatcher specifically so it's unit-testable with a fake on every target. - composeApp/: shared UI on the skainet-ui design system, with a kernelControls slot so the Android-only race UI (KernelRaceApp's kernel pinning, the NEON/SCALAR chips, the split-screen race button) never leaks into common code. - Real test coverage: PromptTemplate/TokenStats/ModelResolver unit tests, a ChatViewModel test suite (fake engine, virtual-time coroutine scheduler), and a GgufSmokeTest that loads the actual SmolLM2 GGUF and generates tokens end to end when the model is present locally. - CI workflow (first build CI in this repo): JVM/Android unit tests, Android debug APK assembly, and a wasm compile check on every PR touching KernelRace/ or skainet-ui/. Verified end to end: clean builds pass on Android/JVM/wasmJs, the Android debug APK packages the NEON .so libs, and the wasm production webpack build correctly bundles the ~145 MB GGUF via Compose resources. The original AndroidNeonLlmDemo snapshot remains available at the 2026_08_arm_android git tag. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The samples page only ever showed a card for samples with a wasm build: generate-samples-page.py unconditionally emitted a demoUrl for every webapp.json it found. CLI-only and Android-only samples had no way to appear at all. - distDirs/build are now optional; a card only needs id/name/description. - demoUrl is emitted only when distDirs is non-empty; samples without one get a "How to run" button linking to the source instead of a dead "Try Demo". - New "platforms" array renders as chips on every card (web, android, ios, desktop, cli, ...), reusing the existing pill styling. - Added platforms to the four existing webapp.json files and a new MnistJavaDemo/webapp.json (the first CLI-only sample on the page). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The repo's root .gitignore excludes *.jar, which silently dropped gradle-wrapper.jar when KernelRace was created (AndroidNeonLlmDemo never had it committed either -- it just never ran in CI). Every sample that runs in CI (TinyTransformer, KllamaDemo, ...) force-adds this jar past the .gitignore rule; KernelRace needs the same, or ./gradlew has nothing to execute. Fixes the KernelRace CI failure on PR #30: "Unable to access jarfile .../KernelRace/gradle/wrapper/gradle-wrapper.jar". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
michalharakal
deleted the
feature/skainet-0.40-0.39-migration-kernelrace
branch
August 12, 2026 19:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.