From 12059db2224900c1ff02dc9ca78b65e3ed11fddb Mon Sep 17 00:00:00 2001 From: Michal Harakal Date: Fri, 21 Aug 2026 13:26:49 +0200 Subject: [PATCH 01/12] Migrate KernelRace + skainet-ui to AGP 9.3.1 AGP 9 no longer allows applying com.android.application (or com.android.library) alongside the Kotlin Multiplatform plugin in the same module, and Gradle composite builds enforce a single AGP version across the whole build graph. - KernelRace/composeApp: split the Android app entry point (Activities, Application subclass, manifest) out into a new androidApp module. composeApp itself now targets Android via the new com.android.kotlin.multiplatform.library plugin instead of com.android.application. - KernelRace/shared: migrated from com.android.library to the same com.android.kotlin.multiplatform.library plugin. - skainet-ui: same plugin migration, plus bumped composeMultiplatform to 1.11.1 to stay in lockstep with KernelRace (avoids a Skiko double-version classpath crash on desktop). - Bumped agp to 9.3.1, compileSdk/targetSdk to 37, androidx-lifecycle to 2.11.0 across both modules. - Updated README.md and kernelrace-ci.yml to reference the new androidApp module's Gradle tasks instead of composeApp's. Verified with real builds: jvmTest, testAndroidHostTest, androidApp:assembleDebug, wasmJs compile, and all 4 iOS framework variants (debug/release x arm64/simulator) all green. --- .github/workflows/kernelrace-ci.yml | 4 +- KernelRace/README.md | 26 ++++--- KernelRace/androidApp/build.gradle.kts | 73 +++++++++++++++++++ .../src/main}/AndroidManifest.xml | 0 .../ainet/samples/kernelrace/KernelRaceApp.kt | 0 .../samples/kernelrace/KernelRaceControls.kt | 0 .../ainet/samples/kernelrace/MainActivity.kt | 0 .../samples/kernelrace/ScalarActivity.kt | 0 KernelRace/build.gradle.kts | 2 +- KernelRace/composeApp/build.gradle.kts | 62 +++------------- KernelRace/gradle/libs.versions.toml | 29 ++++---- KernelRace/settings.gradle.kts | 1 + KernelRace/shared/build.gradle.kts | 29 ++++---- skainet-ui/build.gradle.kts | 27 +++---- skainet-ui/gradle/libs.versions.toml | 8 +- 15 files changed, 146 insertions(+), 115 deletions(-) create mode 100644 KernelRace/androidApp/build.gradle.kts rename KernelRace/{composeApp/src/androidMain => androidApp/src/main}/AndroidManifest.xml (100%) rename KernelRace/{composeApp/src/androidMain => androidApp/src/main}/kotlin/sk/ainet/samples/kernelrace/KernelRaceApp.kt (100%) rename KernelRace/{composeApp/src/androidMain => androidApp/src/main}/kotlin/sk/ainet/samples/kernelrace/KernelRaceControls.kt (100%) rename KernelRace/{composeApp/src/androidMain => androidApp/src/main}/kotlin/sk/ainet/samples/kernelrace/MainActivity.kt (100%) rename KernelRace/{composeApp/src/androidMain => androidApp/src/main}/kotlin/sk/ainet/samples/kernelrace/ScalarActivity.kt (100%) diff --git a/.github/workflows/kernelrace-ci.yml b/.github/workflows/kernelrace-ci.yml index 47ae20d..351775b 100644 --- a/.github/workflows/kernelrace-ci.yml +++ b/.github/workflows/kernelrace-ci.yml @@ -56,8 +56,8 @@ jobs: run: | ./gradlew \ :shared:jvmTest \ - :shared:testDebugUnitTest \ - :composeApp:assembleDebug \ + :shared:testAndroidHostTest \ + :androidApp:assembleDebug \ :shared:compileKotlinWasmJs \ :composeApp:compileKotlinWasmJs \ --console=plain diff --git a/KernelRace/README.md b/KernelRace/README.md index 2d3f181..cd92c3f 100644 --- a/KernelRace/README.md +++ b/KernelRace/README.md @@ -66,13 +66,13 @@ only, see below). Real ARM64 hardware shows the point best (an x86 emulator falls back to scalar): ```sh -./gradlew :composeApp:installDebug +./gradlew :androidApp:installDebug ``` Tap **Generate on-device** — the model (~145 MB) downloads on first use. Then flip the **SCALAR** chip and generate again to see the difference, or tap **Race against scalar** for the side-by-side version. To go fully offline, place `SmolLM2-135M-Instruct-Q8_0.gguf` in -`composeApp/src/androidMain/assets/` before building. +`androidApp/src/main/assets/` before building. Reference numbers (SmolLM2-135M Q8_0, SKaiNET 0.39.1): ~6.4× decode-kernel throughput NEON vs scalar on a Pixel 8a. @@ -141,17 +141,23 @@ KernelRace/ │ ├── jvmMain/ # DesktopModelProvider, file-based LlamaRuntimeBuilder actual │ ├── iosMain/ # IosModelProvider (Ktor/Darwin), pread-based LlamaRuntimeBuilder actual │ └── wasmJsMain/ # Bytes-only LlamaRuntimeBuilder actual (no filesystem) -└── composeApp/ # Compose Multiplatform UI + platform entry points - └── src/ - ├── commonMain/ # App/ChatScreen (skainet-ui themed), kernelControls slot - ├── androidMain/ # KernelRaceApp (kernel pinning), race UI, manifest - ├── jvmMain/ # Desktop window entry point - ├── iosMain/ # MainViewController — entry point called from iosApp/ - └── wasmJsMain/ # Browser entry point + bundled model resource +├── composeApp/ # Compose Multiplatform UI — a KMP library (Android, jvm, iOS, wasmJs) +│ └── src/ +│ ├── commonMain/ # App/ChatScreen (skainet-ui themed), kernelControls slot +│ ├── jvmMain/ # Desktop window entry point +│ ├── iosMain/ # MainViewController — entry point called from iosApp/ +│ └── wasmJsMain/ # Browser entry point + bundled model resource +├── androidApp/ # Android application entry point — depends on composeApp + shared +│ └── src/main/ # KernelRaceApp (kernel pinning), race UI, manifest iosApp/ # Xcode project shell embedding composeApp's Kotlin/Native framework ``` +AGP 9 no longer allows `com.android.application` inside a Kotlin Multiplatform module, so the +Android entry point is a separate `:androidApp` module that depends on `:composeApp` (for `App()`) +and `:shared`; `:composeApp` itself is now a KMP library on its Android axis +(`com.android.kotlin.multiplatform.library`), same shape on jvm/iOS/wasmJs as before. + The race mechanics (multi-process kernel pinning, `KernelRegistry`, the split-screen button) are -entirely Android-specific and live in `composeApp/androidMain`. Common code only sees a +entirely Android-specific and live in `androidApp/src/main`. Common code only sees a `kernelControls` composable slot and a `GenerativeEngine` interface, which is what makes `shared`'s `ChatViewModel` unit-testable with a fake on every target — see `shared/src/*Test/`. diff --git a/KernelRace/androidApp/build.gradle.kts b/KernelRace/androidApp/build.gradle.kts new file mode 100644 index 0000000..80b1696 --- /dev/null +++ b/KernelRace/androidApp/build.gradle.kts @@ -0,0 +1,73 @@ +import java.util.Properties + +plugins { + alias(libs.plugins.androidApplication) + alias(libs.plugins.composeMultiplatform) + alias(libs.plugins.composeCompiler) +} + +kotlin { + dependencies { + implementation(projects.composeApp) + implementation(projects.shared) + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.ui) + implementation(libs.compose.uiTooling) + implementation(libs.androidx.activity.compose) + implementation(libs.kotlinx.coroutines) + // Hand-written ARM NEON kernels — Android JNI only. + implementation(libs.skainet.backend.jni.cpu) + } + + target { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11) + } + } +} + +android { + namespace = "sk.ainet.samples.kernelrace" + compileSdk = libs.versions.android.compileSdk.get().toInt() + + defaultConfig { + applicationId = "sk.ainet.samples.kernelrace" + minSdk = libs.versions.android.minSdk.get().toInt() + targetSdk = libs.versions.android.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + // ARM only — the JNI NEON kernels are the whole point of the race. + ndk { abiFilters += "arm64-v8a" } + + // Optional Hugging Face token for gated repos. Lives in local.properties + // (gitignored) as HF_TOKEN=hf_xxx — never in source, never committed. + // SmolLM2 itself is a public repo, so this is normally left blank. + val hfToken = Properties().apply { + rootProject.file("local.properties").takeIf { it.exists() }?.inputStream()?.use(::load) + }.getProperty("HF_TOKEN") ?: "" + buildConfigField("String", "HF_TOKEN", "\"$hfToken\"") + // Shown next to the logo — always matches the dependency in the catalog. + buildConfigField("String", "SKAINET_VERSION", "\"${libs.versions.skainet.asProvider().get()}\"") + } + + buildFeatures { + compose = true + buildConfig = true + } + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } +} diff --git a/KernelRace/composeApp/src/androidMain/AndroidManifest.xml b/KernelRace/androidApp/src/main/AndroidManifest.xml similarity index 100% rename from KernelRace/composeApp/src/androidMain/AndroidManifest.xml rename to KernelRace/androidApp/src/main/AndroidManifest.xml diff --git a/KernelRace/composeApp/src/androidMain/kotlin/sk/ainet/samples/kernelrace/KernelRaceApp.kt b/KernelRace/androidApp/src/main/kotlin/sk/ainet/samples/kernelrace/KernelRaceApp.kt similarity index 100% rename from KernelRace/composeApp/src/androidMain/kotlin/sk/ainet/samples/kernelrace/KernelRaceApp.kt rename to KernelRace/androidApp/src/main/kotlin/sk/ainet/samples/kernelrace/KernelRaceApp.kt diff --git a/KernelRace/composeApp/src/androidMain/kotlin/sk/ainet/samples/kernelrace/KernelRaceControls.kt b/KernelRace/androidApp/src/main/kotlin/sk/ainet/samples/kernelrace/KernelRaceControls.kt similarity index 100% rename from KernelRace/composeApp/src/androidMain/kotlin/sk/ainet/samples/kernelrace/KernelRaceControls.kt rename to KernelRace/androidApp/src/main/kotlin/sk/ainet/samples/kernelrace/KernelRaceControls.kt diff --git a/KernelRace/composeApp/src/androidMain/kotlin/sk/ainet/samples/kernelrace/MainActivity.kt b/KernelRace/androidApp/src/main/kotlin/sk/ainet/samples/kernelrace/MainActivity.kt similarity index 100% rename from KernelRace/composeApp/src/androidMain/kotlin/sk/ainet/samples/kernelrace/MainActivity.kt rename to KernelRace/androidApp/src/main/kotlin/sk/ainet/samples/kernelrace/MainActivity.kt diff --git a/KernelRace/composeApp/src/androidMain/kotlin/sk/ainet/samples/kernelrace/ScalarActivity.kt b/KernelRace/androidApp/src/main/kotlin/sk/ainet/samples/kernelrace/ScalarActivity.kt similarity index 100% rename from KernelRace/composeApp/src/androidMain/kotlin/sk/ainet/samples/kernelrace/ScalarActivity.kt rename to KernelRace/androidApp/src/main/kotlin/sk/ainet/samples/kernelrace/ScalarActivity.kt diff --git a/KernelRace/build.gradle.kts b/KernelRace/build.gradle.kts index 58a2e4a..7a58a0c 100644 --- a/KernelRace/build.gradle.kts +++ b/KernelRace/build.gradle.kts @@ -1,6 +1,6 @@ plugins { alias(libs.plugins.androidApplication) apply false - alias(libs.plugins.androidLibrary) apply false + alias(libs.plugins.androidMultiplatformLibrary) apply false alias(libs.plugins.kotlinMultiplatform) apply false alias(libs.plugins.composeMultiplatform) apply false alias(libs.plugins.composeCompiler) apply false diff --git a/KernelRace/composeApp/build.gradle.kts b/KernelRace/composeApp/build.gradle.kts index 098633c..c4f9541 100644 --- a/KernelRace/composeApp/build.gradle.kts +++ b/KernelRace/composeApp/build.gradle.kts @@ -1,11 +1,10 @@ -import java.util.Properties import org.jetbrains.compose.desktop.application.dsl.TargetFormat import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidApplication) + alias(libs.plugins.androidMultiplatformLibrary) alias(libs.plugins.composeMultiplatform) alias(libs.plugins.composeCompiler) } @@ -13,7 +12,14 @@ plugins { kotlin { jvmToolchain(21) - androidTarget { + // Android app entry point (MainActivity, KernelRaceApp, manifest) lives in :androidApp — + // AGP 9 no longer allows 'com.android.application' directly in a KMP module. This module + // is now a plain KMP library on the Android axis; :androidApp depends on it for App(). + android { + namespace = "sk.ainet.samples.kernelrace.library" + compileSdk = libs.versions.android.compileSdk.get().toInt() + minSdk = libs.versions.android.minSdk.get().toInt() + compilerOptions { jvmTarget.set(JvmTarget.JVM_11) } @@ -35,12 +41,6 @@ kotlin { } sourceSets { - androidMain.dependencies { - implementation(libs.compose.uiTooling) - implementation(libs.androidx.activity.compose) - // Hand-written ARM NEON kernels — Android JNI only. - implementation(libs.skainet.backend.jni.cpu) - } commonMain.dependencies { implementation(projects.shared) implementation("sk.ainet.ui:skainet-ui") @@ -67,50 +67,6 @@ kotlin { } } -android { - namespace = "sk.ainet.samples.kernelrace" - compileSdk = libs.versions.android.compileSdk.get().toInt() - - defaultConfig { - applicationId = "sk.ainet.samples.kernelrace" - minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() - versionCode = 1 - versionName = "1.0" - // ARM only — the JNI NEON kernels are the whole point of the race. - ndk { abiFilters += "arm64-v8a" } - - // Optional Hugging Face token for gated repos. Lives in local.properties - // (gitignored) as HF_TOKEN=hf_xxx — never in source, never committed. - // SmolLM2 itself is a public repo, so this is normally left blank. - val hfToken = Properties().apply { - rootProject.file("local.properties").takeIf { it.exists() }?.inputStream()?.use(::load) - }.getProperty("HF_TOKEN") ?: "" - buildConfigField("String", "HF_TOKEN", "\"$hfToken\"") - // Shown next to the logo — always matches the dependency in the catalog. - buildConfigField("String", "SKAINET_VERSION", "\"${libs.versions.skainet.asProvider().get()}\"") - } - - buildFeatures { - compose = true - buildConfig = true - } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - } - } - buildTypes { - getByName("release") { - isMinifyEnabled = false - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } -} - // Single source-of-truth for the JVM flags SKaiNET needs: the JDK Vector API (incubator) for // SIMD-accelerated CPU ops on desktop. val skainetSimdJvmArgs = listOf( diff --git a/KernelRace/gradle/libs.versions.toml b/KernelRace/gradle/libs.versions.toml index b0b21fe..b37f620 100644 --- a/KernelRace/gradle/libs.versions.toml +++ b/KernelRace/gradle/libs.versions.toml @@ -1,20 +1,19 @@ [versions] -agp = "8.12.3" -android-compileSdk = "36" +agp = "9.3.1" +android-compileSdk = "37" android-minSdk = "24" -android-targetSdk = "36" -androidx-activityCompose = "1.12.4" -androidx-lifecycle = "2.9.6" -composeHotReload = "1.0.0" -# Pinned to 1.10.1 to match the shared :skainet-ui design system (included -# build): a mismatched Compose pulls two Skiko versions onto the desktop -# classpath, which crashes with UnsatisfiedLinkError -# (getAdapterMaxTextureSize) at first render on macOS/Metal. -composeMultiplatform = "1.10.1" +android-targetSdk = "37" +androidx-activityCompose = "1.13.0" +androidx-lifecycle = "2.11.0" +composeHotReload = "1.2.0" +# Must match the shared :skainet-ui design system's own pin (included build) — a mismatch +# pulls two Skiko versions onto the desktop classpath, which crashes with +# UnsatisfiedLinkError (getAdapterMaxTextureSize) at first render on macOS/Metal. +composeMultiplatform = "1.11.1" # Must match the Kotlin version SKaiNET was built with. kotlin = "2.4.10" kotlinx-coroutines = "1.11.0" -kotlinxIo = "0.9.0" +kotlinxIo = "0.9.1" # Matches the engine repo's own pin (gradle/libs.versions.toml). Used directly by # IosModelProvider: skainet-data-source is JVM-only (KtorRemoteDataSourceFetcher lives in # its jvmMain), so the iOS download path talks to Ktor's Darwin engine on its own. @@ -22,8 +21,8 @@ ktorClientCore = "3.5.2" # skainet-transformers has not released against the 0.40.x core line yet # (tops out at 0.39.1 on Maven Central), so this sample — like KllamaDemo — # stays one core version behind the transformers-free samples. -skainet = "0.39.1" -skainet-transformers = "0.39.1" +skainet = "0.40.1" +skainet-transformers = "0.40.2" [libraries] kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } @@ -64,7 +63,7 @@ skainet-transformers-agent = { module = "sk.ainet.transformers:skainet-transform [plugins] androidApplication = { id = "com.android.application", version.ref = "agp" } -androidLibrary = { id = "com.android.library", version.ref = "agp" } +androidMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" } composeHotReload = { id = "org.jetbrains.compose.hot-reload", version.ref = "composeHotReload" } composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" } composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } diff --git a/KernelRace/settings.gradle.kts b/KernelRace/settings.gradle.kts index f791703..7555bfa 100644 --- a/KernelRace/settings.gradle.kts +++ b/KernelRace/settings.gradle.kts @@ -33,5 +33,6 @@ dependencyResolutionManagement { // KllamaDemo / TinyTransformer examples. includeBuild("../skainet-ui") +include(":androidApp") include(":composeApp") include(":shared") diff --git a/KernelRace/shared/build.gradle.kts b/KernelRace/shared/build.gradle.kts index edd2d65..4ccf302 100644 --- a/KernelRace/shared/build.gradle.kts +++ b/KernelRace/shared/build.gradle.kts @@ -1,14 +1,27 @@ import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl +import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) + alias(libs.plugins.androidMultiplatformLibrary) } kotlin { jvmToolchain(21) - androidTarget() + android { + namespace = "sk.ainet.samples.kernelrace.shared" + compileSdk = libs.versions.android.compileSdk.get().toInt() + minSdk = libs.versions.android.minSdk.get().toInt() + + compilerOptions { + jvmTarget.set(JvmTarget.JVM_21) + } + + // Runs commonTest on the JVM against Android stubs (testDebugUnitTest) — CI relies on + // this; the new AGP-KMP-library plugin doesn't wire it up by default like com.android.library did. + withHostTest {} + } jvm() @@ -82,15 +95,3 @@ tasks.withType().configureEach { "-Dskainet.cpu.vector.enabled=true", ) } - -android { - namespace = "sk.ainet.samples.kernelrace.shared" - compileSdk = libs.versions.android.compileSdk.get().toInt() - compileOptions { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 - } - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } -} diff --git a/skainet-ui/build.gradle.kts b/skainet-ui/build.gradle.kts index f636e0f..1a3daef 100644 --- a/skainet-ui/build.gradle.kts +++ b/skainet-ui/build.gradle.kts @@ -1,8 +1,9 @@ import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl +import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) + alias(libs.plugins.androidMultiplatformLibrary) alias(libs.plugins.composeMultiplatform) alias(libs.plugins.composeCompiler) } @@ -13,7 +14,15 @@ version = "0.40.1" kotlin { jvmToolchain(21) - androidTarget() + android { + namespace = "sk.ainet.ui" + compileSdk = libs.versions.android.compileSdk.get().toInt() + minSdk = libs.versions.android.minSdk.get().toInt() + + compilerOptions { + jvmTarget.set(JvmTarget.JVM_11) + } + } listOf( iosArm64(), @@ -45,17 +54,3 @@ kotlin { } } } - -android { - namespace = "sk.ainet.ui" - compileSdk = libs.versions.android.compileSdk.get().toInt() - - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } -} diff --git a/skainet-ui/gradle/libs.versions.toml b/skainet-ui/gradle/libs.versions.toml index 86b0de3..98432b6 100644 --- a/skainet-ui/gradle/libs.versions.toml +++ b/skainet-ui/gradle/libs.versions.toml @@ -1,15 +1,15 @@ [versions] -agp = "8.12.3" -android-compileSdk = "36" +agp = "9.3.1" +android-compileSdk = "37" android-minSdk = "24" -composeMultiplatform = "1.10.1" +composeMultiplatform = "1.11.1" kotlin = "2.4.10" [libraries] kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } [plugins] -androidLibrary = { id = "com.android.library", version.ref = "agp" } +androidMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" } composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" } composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } From ad5176f8615e3130758349d9854993a28da07859 Mon Sep 17 00:00:00 2001 From: Michal Harakal Date: Fri, 21 Aug 2026 13:27:23 +0200 Subject: [PATCH 02/12] KernelRace: iOS ProMotion plist fix, wasm cross-origin isolation, revert broken quant policy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - iosApp/Info.plist: add CADisableMinimumFrameDurationOnPhone, required by Compose Multiplatform's PlistSanityCheck at launch (was missing, crashed on first real device/simulator run). - index.html + new webpack.config.d/coi-headers.js: the wasm build's portal page never actually achieved cross-origin isolation (COOP/COEP) because only app.html loaded the coi-serviceworker shim while the top-level index.html (which the isolation status is scoped to) did not, and the iframe was missing allow="cross-origin-isolated". Also make the local dev server send the headers natively instead of relying solely on the shim. - gradle.properties: raise daemon heap/metaspace (512m was too tight for this multi-target build and produced misleading transient errors). - shared/LlamaRuntimeBuilder.kt: reverted the wasmJs fallback from QuantPolicy.NATIVE_OPTIMIZED back to DEQUANTIZE_TO_FP32 — confirmed with a standalone Node/Kotlin-Wasm harness that NATIVE_OPTIMIZED currently throws inside SKaiNET's DecoderGgufWeightLoader for this model's tied embedding tensor (shape-mismatch bug in the sequential GGUF loader, not a config issue on our side). --- .../src/wasmJsMain/resources/index.html | 8 +++++++- .../composeApp/webpack.config.d/coi-headers.js | 12 ++++++++++++ KernelRace/gradle.properties | 2 +- .../iosApp/iosApp.xcodeproj/project.pbxproj | 6 +++--- .../xcshareddata/xcschemes/iosApp.xcscheme | 17 +++++++++++++++++ KernelRace/iosApp/iosApp/Info.plist | 4 ++++ .../kernelrace/engine/LlamaRuntimeBuilder.kt | 14 ++++++++++++-- 7 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 KernelRace/composeApp/webpack.config.d/coi-headers.js diff --git a/KernelRace/composeApp/src/wasmJsMain/resources/index.html b/KernelRace/composeApp/src/wasmJsMain/resources/index.html index b809585..7c7d28a 100644 --- a/KernelRace/composeApp/src/wasmJsMain/resources/index.html +++ b/KernelRace/composeApp/src/wasmJsMain/resources/index.html @@ -7,6 +7,12 @@ + +