You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,9 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
6
6
7
7
## [Unreleased]
8
8
9
+
### Added
10
+
- README "SKaiNET notebook dependency" section now documents the `%use skainet-notebook` magic alongside the existing `@file:DependsOn` form, including version-pin variants (`%use skainet-notebook(0.22.1)`, `@0.22.1`) and a callout that JVM startup args (e.g. `--add-modules jdk.incubator.vector`) still have to be set on the kernel — the registry descriptor cannot inject them. Companion descriptor `skainet-notebook.json` is staged for submission to https://github.com/Kotlin/kotlin-jupyter-libraries; once merged it makes `%use skainet-notebook` work out of the box from any Kotlin Jupyter kernel.
Copy file name to clipboardExpand all lines: README.adoc
+34-1Lines changed: 34 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,13 +38,45 @@ You can create Kotlin notebooks directly in IntelliJ IDEA using one of these met
38
38
39
39
== SKaiNET notebook dependency
40
40
41
-
Use SKaiNET directly in a Kotlin Notebook via Maven Central.
41
+
There are two ways to pull SKaiNET into a Kotlin Notebook cell. Pick whichever fits your kernel — both load the same uber-jar and run the same `SKaiNETJupyterIntegration` (default imports, tensor / image renderers, ready banner, SIMD-availability check).
42
+
43
+
=== Via `%use` magic (registry-driven)
44
+
45
+
Once `skainet-notebook.json` lands in the https://github.com/Kotlin/kotlin-jupyter-libraries[Kotlin Jupyter library registry], a single line is enough — the kernel resolves the artifact coordinate and version pin from the registry and the in-classpath integration takes over from there:
46
+
47
+
[source, Kotlin]
48
+
----
49
+
%use skainet-notebook
50
+
----
51
+
52
+
Pin a specific version (otherwise the registry's `properties.v` wins):
53
+
54
+
[source, Kotlin]
55
+
----
56
+
%use skainet-notebook(0.22.1)
57
+
%use skainet-notebook@0.22.1
58
+
----
59
+
60
+
Combine with other registry libraries in the usual comma-separated form:
61
+
62
+
[source, Kotlin]
63
+
----
64
+
%use skainet-notebook, dataframe, lets-plot
65
+
----
66
+
67
+
NOTE: JVM startup arguments (notably `--add-modules jdk.incubator.vector`, see <<enabling-simd>>) cannot be set from a registry descriptor — they have to be configured on the kernel itself. The integration will still load on a vanilla kernel; it will just emit the SIMD-not-active warning and run the scalar CPU path.
68
+
69
+
=== Via `@file:DependsOn` (explicit coordinate)
70
+
71
+
When you need to pin against a specific Maven coordinate without depending on the registry (offline kernels, internal mirrors, locked-down environments):
SKaiNET's CPU backend uses the JDK Vector API (`jdk.incubator.vector`) for SIMD-accelerated matmul, quantized kernels (Q4_K, Q6_K, Q8_0, TurboQuant), and elementwise/reduction ops. The Vector API is an incubator module — it is shipped with the JDK but *not* in the default module graph, so the kernel JVM has to be started with `--add-modules jdk.incubator.vector` for SKaiNET to install the SIMD kernels. Without that flag, SKaiNET silently falls back to scalar `DefaultCpuOps`.
0 commit comments