Skip to content

Commit 909633c

Browse files
michalharakalclaude
andcommitted
build(native-cpu): add publishing config + register in BOM
Layers the publishing setup that PR 1 of the native-FFM rollout deliberately deferred (#571) onto the now-shipped scaffolding + kernels. Lets downstream consumers pull the native provider through the same coordinate-driven path the rest of the SKaiNET libraries use, and lets a composite-build consumer (e.g. SKaiNET-transformers via includeBuild) substitute the published coordinates with a local project ref. Changes: - skainet-backends/skainet-backend-native-cpu/build.gradle.kts: add `alias(libs.plugins.vanniktech.mavenPublish)` to the plugins block. The vanniktech plugin auto-derives Maven coordinates from the root group (`sk.ainet.core`), version (`VERSION_NAME` — currently 0.22.0-SNAPSHOT), and the new gradle.properties below. - skainet-backends/skainet-backend-native-cpu/gradle.properties: NEW. POM_ARTIFACT_ID=skainet-backend-native-cpu and POM_NAME mirroring the convention every other publishable module uses. - skainet-bom/build.gradle.kts: add `api(project(":skainet-backends:skainet-backend-native-cpu"))` alongside the existing backend-api / backend-cpu constraints, so consumers depending on the BOM get a constrained version of the native module without adding a separate version pin. Verification: - ./gradlew :skainet-backends:skainet-backend-native-cpu:publishToMavenLocal -PRELEASE_SIGNING_ENABLED=false -PsignAllPublications=false publishes sk.ainet.core:skainet-backend-native-cpu-jvm:0.22.0-SNAPSHOT to ~/.m2 alongside the existing backend artifacts. - ./gradlew publishToMavenLocal (full repo) — green, no regressions in the existing modules' publish tasks. The native module's JAR carries the host-arch shared library at native/<os>-<arch>/libskainet_kernels.{so|dylib|dll}, so a JAR published from this build host (linux-x86_64 here) only carries the linux-x86_64 .so. Multi-arch fat-JAR aggregation across the PR 4 cross-arch CI matrix runners is still deferred — consumers on other arches cleanly fall back to the priority-50 Panama provider when the native lib doesn't load. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9d05fc4 commit 909633c

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

skainet-backends/skainet-backend-native-cpu/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
alias(libs.plugins.kotlinMultiplatform)
3+
alias(libs.plugins.vanniktech.mavenPublish)
34
}
45

56
kotlin {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
POM_ARTIFACT_ID=skainet-backend-native-cpu
2+
POM_NAME=skainet native (FFM) CPU kernel provider

skainet-bom/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ dependencies {
1818
// Backend abstraction + CPU backend
1919
api(project(":skainet-backends:skainet-backend-api"))
2020
api(project(":skainet-backends:skainet-backend-cpu"))
21+
// Native (FFM) priority-100 kernel provider — bundles a
22+
// libskainet_kernels shared library and overrides the
23+
// priority-50 Panama kernels for Q4_K and FP32 matmul on
24+
// hosts where the native lib resolves. Cascades to Panama
25+
// otherwise (missing arch, sandbox, kill-switch).
26+
api(project(":skainet-backends:skainet-backend-native-cpu"))
2127

2228
// IO modules
2329
api(project(":skainet-io:skainet-io-core"))

0 commit comments

Comments
 (0)