Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Register the native cinterop kernels on Apple targets in the runtime facades

Đang mở
#298 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
43/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
kotlin
Lĩnh vực
backend

Hướng nghiên cứu

Read the existing registerPlatformBackends actuals in llm-runtime/kllama and llm-runtime/kgemma, then compare the Android wiring from #285. Add Apple source set dependencies and register native kernels as described; update the README target matrix. Verify with the cross-target SmolLm2InferenceSpike on iosSimulatorArm64Test on macOS after the Apple klibs are published; done means the facade installs kernels and the documented direct-consumer path is clear.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Apple half of the mobile-kernels story (engine SKaiNET#920 / #959; the Android half landed via #285). Engine develop now publishes skainet-backend-native-cpu for iosArm64 / iosSimulatorArm64 / macosArm64 (engine PR #962) with the kernel archives embedded in the klibs and runtime FEAT_DotProd dispatch (engine #958: A13+/M-series fast path, A12 scalar-int fallback — one archive, no SIGILL).

Registration on Kotlin/Native is manual (no ServiceLoader): a consumer calls installNativeKernels() once at startup. Today no transformers module does, so Apple K/N consumers of the runtime facades run packed-quant matmul on the scalar floor — the field report's 0.11 tok/s iOS simulator number.

Plan (mirrors the Android JNI wiring from #285):

  1. llm-runtime/kllama + llm-runtime/kgemma: add sk.ainet.core:skainet-backend-native-cpu to the Apple source sets and call installNativeKernels() from the existing registerPlatformBackends actual (kllama's src/iosMain has exactly this seam — it was dead code before #274 added the targets).
  2. README target-matrix note (Apple gets native packed-quant kernels through the facades out of the box; direct inference-llama consumers call installNativeKernels() themselves).
  3. Numbers: run the existing cross-target SmolLm2InferenceSpike on iosSimulatorArm64Test (SIMCTL_CHILD_ env forwarding is already wired) on a macOS host, and physical-device numbers via the field-report author's standing test offer — A13+ fast arm; A12 no-SIGILL check if an XS/XR is available.

Blocked on: the next engine release publishing the Apple klibs to Maven Central (engine #964 adds the release plumbing). Until then the wiring can only be compile-verified on a macOS host via the composite build — this box (Linux) cannot build the engine's Apple cinterop.

Ngôn ngữ chính
Kotlin
Star
8
Fork
3
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
48

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SKaiNET-developers/SKaiNET-transformers

Tất cả issue của SKaiNET-developers/SKaiNET-transformers

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.