skainet-backend-native-cpu: JVM artifact ships no linux-arm64 libskainet_kernels.so → silent ~1000× reference-kernel fallback on ARM Linux
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cmake, kotlin, linux
- Lĩnh vực
- backend, build-system, performance
Hướng nghiên cứu
Start with the skainet-backend-native-cpu native CMake build and the JVM artifact packaging configuration; the issue says CMake already supports aarch64 and identifies the missing native/linux-arm64/libskainet_kernels.so resource. Check how the existing Linux, macOS, and Windows libraries are built and bundled, then determine how CI can build and include the ARM Linux library. Done when the published JVM artifact contains that library and ARM Linux loads a native kernel instead of falling back to the reference decoder.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The published skainet-backend-native-cpu 0.61.0 JVM artifact bundles libskainet_kernels for linux-x86_64, macos-arm64 and windows-x86_64 only. There is no native/linux-arm64/libskainet_kernels.so, although NativeLibraryLoader already resolves that path ("aarch64", "arm64" -> "arm64").
On a linux-arm64 JVM, the loader finds nothing, so KernelDispatch has no kernel for packed weights and falls back to the reference decoder:
[SKaiNET] KernelDispatch: no kernel registered for matmul (activation=Dense(bytesPerElement=4), weight=BITNET_B1_58, order=ROW_MAJOR); falling back to the decoding reference kernel (~1000x slower). Install a kernel pack (e.g. KernelPacks.install() + FfmRowMajorKernelPack.install()) before the first forward. Further fallbacks are not reported.
Repro
- Board: Arduino Ventuno Q (QCS8275, 4× Cortex-A78C + 4× A55), Ubuntu 24.04, Temurin 21.0.12.1 (aarch64).
- SKaiNET-transformers
develop@ a92d65e::llm-apps:skainet-cli:shadowJar. unzip -l skainet-all.jar | grep native/shows onlylinux-x86_64,macos-arm64andwindows-x86_64.java --enable-preview --add-modules jdk.incubator.vector -jar skainet-all.jar -m ggml-model-i2_s.gguf -s 32 "The capital of France is"(BitNet b1.58 2B4T): one thread sits inReferenceMatmulKernel→BitNetB158TensorData.dequantizeBlock, with 0 tokens after 10.5 min.
Workaround (verified)
I cross-built the library from skainet-backends/skainet-backend-native-cpu/native at tag 0.61.0 and added it to the jar:
cmake -S native -B b -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_BUILD_TYPE=Release
cmake --build b --target skainet_kernels
mkdir -p native/linux-arm64 && cp b/libskainet_kernels.so native/linux-arm64/
jar uf skainet-all.jar native/linux-arm64/libskainet_kernels.so
With that, the same run produces correct greedy output at 1.6–1.8 tok/s instead of the reference fallback.
Ask
- Build and bundle
native/linux-arm64/libskainet_kernels.soin the JVM artifact. The CMake file already handlesaarch64cross builds (-march=armv8.2-a+fp16+dotprod, with NeoGPU pinned toarmv8-a). A CI job usinggcc-aarch64-linux-gnuor an arm64 runner would cover it. - Consider making the "no kernel registered → reference fallback" message an error on platforms where a native pack is expected, or at least naming the missing resource path.
Related: #920 (mobile/Apple/Android JNI; this issue is the plain linux-arm64 JVM case: Raspberry Pi, Qualcomm IoT boards, Graviton).
- Ngôn ngữ chính
- Kotlin
- Star
- 52
- Fork
- 15
- Merge trung bình
- 23 giờ 34 phút
- Pull request đã merge (30 ngày)
- 45
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SKaiNET-developers/SKaiNET
-
native-cpu: -Wreturn-type in skainet_row_threads.c:150 (worker fn has no return)Có thể đã có người làm @Doomguy-BFG9000 đã nhận 1 ngày trước. Đang mởgood first issue size:xs skill:native
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
SKaiNET-developers/SKaiNET#1358 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
coding good first issue platform size:xs skill:js sub-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SKaiNET-developers/SKaiNET#1232 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ternary decode on 4× Cortex-A78C: row-thread pool only 40–60 % busy, 1.8 tok/s (BitNet 2B4T) — dispatch-bound, not bandwidth-boundCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởcompute-backend research skill:native
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
SKaiNET-developers/SKaiNET#1357 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ground truth: add Kotlin/Native target(s) to skainet-test-groundtruth (jvm/android only today)Đang mởenhancement platform skill:native sub-issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
SKaiNET-developers/SKaiNET#1301 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
compute-backend skill:android tracking
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
SKaiNET-developers/SKaiNET#1282 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SKaiNET-developers/SKaiNET
Issue tương tự
-
Blank screen in Download tab after searching with no results and switching tabsCó thể đã có người làm @mangod12 đã nhận hôm nay. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
kiwix/kiwix-android#5211 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
deniscerri/ytdlnis#1430 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Lock owned by another client (e.g. Text app) cannot be unlocked from the appCó thể đã có người làm @falkloewert đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Submission] 悠悠有品Đang mởsubmit-adaption submit-adaption-pre
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
BetterAndroid/android-notification-icon-project#763 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
simplex-chat/simplex-chat#7755 ·
Maintainer thường phản hồi trong vòng 1 ngày