numkong 7.4.1 → 7.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -67
- package/binding.gyp +16 -0
- package/include/numkong/capabilities.h +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -77,27 +77,27 @@ NumKong covers 17 numeric types — from 6-bit floats to 64-bit complex numbers
|
|
|
77
77
|
|
|
78
78
|
### Language Bindings
|
|
79
79
|
|
|
80
|
-
| Operation | [C
|
|
81
|
-
| :-------------------------- |
|
|
82
|
-
| __Vector Ops__ |
|
|
83
|
-
| [Dot] Product |
|
|
84
|
-
| [Spatial] Metric |
|
|
85
|
-
| [Set] Similarity |
|
|
86
|
-
| [Geo]spatial |
|
|
87
|
-
| [Mesh] Alignment |
|
|
88
|
-
| [Sparse] Products |
|
|
89
|
-
| [
|
|
90
|
-
| [Curved] Spaces |
|
|
91
|
-
| __Many-to-Many Vector Ops__ |
|
|
92
|
-
| "[Dots]" Products |
|
|
93
|
-
| "[Spatials]" Metrics |
|
|
94
|
-
| "[Sets]" Similarities |
|
|
95
|
-
| [MaxSim] Scoring |
|
|
96
|
-
| __Scalar Ops__ |
|
|
97
|
-
| [Cast] |
|
|
98
|
-
| [Reduce] |
|
|
99
|
-
| [Each] |
|
|
100
|
-
| [
|
|
80
|
+
| Operation | [C and C++][c] | [Python][py] | [Rust][rs] | [JavaScript][js] | [Swift][swift] | [GoLang][go] |
|
|
81
|
+
| :-------------------------- | :------------: | :----------: | :--------: | :--------------: | :------------: | :----------: |
|
|
82
|
+
| __Vector Ops__ | | | | | | |
|
|
83
|
+
| [Dot] Product | ● | ● | ● | ● | ● | ● |
|
|
84
|
+
| [Spatial] Metric | ● | ● | ● | ● | ● | ● |
|
|
85
|
+
| [Set] Similarity | ● | ● | ● | ● | ● | ● |
|
|
86
|
+
| [Geo]spatial | ● | ● | ● | · | ● | ● |
|
|
87
|
+
| [Mesh] Alignment | ● | ● | ● | · | · | · |
|
|
88
|
+
| [Sparse] Products | ● | ● | ● | · | · | · |
|
|
89
|
+
| [Probability] Divergences | ● | ● | ● | ● | · | ● |
|
|
90
|
+
| [Curved] Spaces | ● | ● | ● | · | · | · |
|
|
91
|
+
| __Many-to-Many Vector Ops__ | | | | | | |
|
|
92
|
+
| "[Dots]" Products | ● | ● | ● | ● | ● | ● |
|
|
93
|
+
| "[Spatials]" Metrics | ● | ● | ● | ● | ● | ● |
|
|
94
|
+
| "[Sets]" Similarities | ● | ● | ● | · | ● | ● |
|
|
95
|
+
| [MaxSim] Scoring | ● | ● | ● | · | ● | ● |
|
|
96
|
+
| __Scalar Ops__ | | | | | | |
|
|
97
|
+
| [Cast] | ● | ● | ● | ● | · | · |
|
|
98
|
+
| [Reduce] | ● | ● | ● | · | · | · |
|
|
99
|
+
| [Each] | ● | ● | ● | · | · | · |
|
|
100
|
+
| [Trigonometry] | ● | ● | ● | · | · | · |
|
|
101
101
|
|
|
102
102
|
[Dot]: include/numkong/dot/README.md
|
|
103
103
|
[Dots]: include/numkong/dots/README.md
|
|
@@ -107,12 +107,12 @@ NumKong covers 17 numeric types — from 6-bit floats to 64-bit complex numbers
|
|
|
107
107
|
[Sets]: include/numkong/sets/README.md
|
|
108
108
|
[Cast]: include/numkong/cast/README.md
|
|
109
109
|
[Reduce]: include/numkong/reduce/README.md
|
|
110
|
-
[
|
|
110
|
+
[Trigonometry]: include/numkong/trigonometry/README.md
|
|
111
111
|
[MaxSim]: include/numkong/maxsim/README.md
|
|
112
112
|
[Mesh]: include/numkong/mesh/README.md
|
|
113
113
|
[Each]: include/numkong/each/README.md
|
|
114
114
|
[Sparse]: include/numkong/sparse/README.md
|
|
115
|
-
[
|
|
115
|
+
[Probability]: include/numkong/probability/README.md
|
|
116
116
|
[Curved]: include/numkong/curved/README.md
|
|
117
117
|
[Geo]: include/numkong/geospatial/README.md
|
|
118
118
|
[c]: include/README.md
|
|
@@ -122,50 +122,6 @@ NumKong covers 17 numeric types — from 6-bit floats to 64-bit complex numbers
|
|
|
122
122
|
[swift]: swift/README.md
|
|
123
123
|
[go]: golang/README.md
|
|
124
124
|
|
|
125
|
-
### Numeric Types × Backend
|
|
126
|
-
|
|
127
|
-
| Backend | f64 | f32 | bf16 | f16 | e5m2 | e4m3 | e3m2 | e2m3 | i8 | u8 | i4 | u4 | u1 | f64c | f32c | bf16c | f16c |
|
|
128
|
-
| :------------- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
129
|
-
| __x86__ | | | | | | | | | | | | | | | | | |
|
|
130
|
-
| Haswell | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
|
|
131
|
-
| Skylake | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | · | · |
|
|
132
|
-
| Ice Lake | · | · | · | ● | · | · | ● | ● | ● | ● | ● | ● | ● | · | · | · | · |
|
|
133
|
-
| Genoa | · | · | ● | · | ● | ● | · | · | · | · | · | · | · | · | · | ● | · |
|
|
134
|
-
| Sapphire | · | · | · | ● | · | ● | · | · | ● | ● | · | · | · | · | · | · | · |
|
|
135
|
-
| Sapphire AMX | · | · | ● | · | ● | ● | ● | ● | ● | ● | · | · | · | · | · | · | · |
|
|
136
|
-
| Alder Lake | · | · | · | · | · | · | ● | ● | ● | ● | · | · | · | · | · | · | · |
|
|
137
|
-
| Sierra Forest | · | · | · | · | · | · | ● | ● | ● | ● | · | · | · | · | · | · | · |
|
|
138
|
-
| Turin | · | ● | ● | · | · | · | · | · | · | · | · | · | · | · | · | · | · |
|
|
139
|
-
| Diamond | · | · | · | ● | ● | ● | · | · | · | · | · | · | · | · | · | · | · |
|
|
140
|
-
| __Arm__ | | | | | | | | | | | | | | | | | |
|
|
141
|
-
| NEON | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | · | · | ● | ● | ● | · | ● |
|
|
142
|
-
| NEON Half | · | · | · | ● | · | · | · | · | ● | ● | · | · | · | · | · | · | · |
|
|
143
|
-
| NEON FHM | · | · | · | ● | ● | ● | · | · | · | · | · | · | · | · | · | · | ● |
|
|
144
|
-
| NEON BF16 | · | · | ● | · | ● | ● | · | · | · | · | · | · | · | · | · | ● | · |
|
|
145
|
-
| NEON SDot | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | · | · | · | · | · |
|
|
146
|
-
| NEON FP8 | · | · | · | · | ● | ● | ● | ● | · | · | · | · | · | · | · | · | · |
|
|
147
|
-
| SVE | ● | ● | · | · | · | · | · | · | · | ● | · | · | ● | ● | ● | · | · |
|
|
148
|
-
| SVE Half | · | · | · | ● | · | · | · | · | · | · | · | · | · | · | · | · | ● |
|
|
149
|
-
| SVE BF16 | · | · | ● | · | · | · | · | · | · | · | · | · | · | · | · | · | · |
|
|
150
|
-
| SVE SDot | · | · | · | · | · | · | · | · | ● | ● | · | · | · | · | · | · | · |
|
|
151
|
-
| SVE2 | · | ● | ● | · | · | · | · | · | · | · | · | · | · | · | · | · | · |
|
|
152
|
-
| SME | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | · | · | · | · | · |
|
|
153
|
-
| SME F64 | ● | ● | · | · | · | · | · | · | · | · | · | · | · | ● | ● | · | · |
|
|
154
|
-
| SME BI32 | · | · | · | · | · | · | · | · | · | · | · | · | ● | · | · | · | · |
|
|
155
|
-
| __RISC-V__ | | | | | | | | | | | | | | | | | |
|
|
156
|
-
| RVV | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | · | · |
|
|
157
|
-
| RVV Half | · | · | · | ● | ● | ● | · | · | · | · | · | · | · | · | · | · | · |
|
|
158
|
-
| RVV BF16 | · | · | ● | · | ● | ● | · | · | · | · | · | · | · | · | · | · | · |
|
|
159
|
-
| RVV BB | · | · | · | · | · | · | · | · | · | · | · | · | ● | · | · | · | · |
|
|
160
|
-
| __Other__ | | | | | | | | | | | | | | | | | |
|
|
161
|
-
| Power VSX | ● | ● | ● | ● | · | · | · | · | ● | ● | · | · | ● | · | · | · | · |
|
|
162
|
-
| LoongArch LASX | ● | ● | ● | ● | · | · | · | · | ● | ● | · | · | ● | · | · | · | · |
|
|
163
|
-
| WASM V128 | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | · | · |
|
|
164
|
-
|
|
165
|
-
Not every combination is implemented — only the ones that unlock real performance gains.
|
|
166
|
-
The `icelake` level doesn't get a `dot_bf16` variant, for example, and falls through to `dot_bf16_skylake`.
|
|
167
|
-
Every operation has a `serial` fallback, but even types no CPU supports today get optimized via lookup tables and bit-twiddling hacks rather than scalar loops.
|
|
168
|
-
For details on compile-time and run-time [dispatch](#compile-time-and-run-time-dispatch), see the contributor guide.
|
|
169
125
|
|
|
170
126
|
## Design Decisions
|
|
171
127
|
|
package/binding.gyp
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "numkong",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.2",
|
|
4
4
|
"description": "Portable mixed-precision math, linear-algebra, & retrieval library with 2000+ SIMD kernels for x86, Arm, RISC-V, LoongArch, Power, & WebAssembly",
|
|
5
5
|
"homepage": "https://github.com/ashvardanian/NumKong",
|
|
6
6
|
"author": "Ash Vardanian",
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
"printWidth": 120
|
|
99
99
|
},
|
|
100
100
|
"optionalDependencies": {
|
|
101
|
-
"@numkong/darwin-arm64": "7.4.
|
|
102
|
-
"@numkong/darwin-x64": "7.4.
|
|
103
|
-
"@numkong/linux-arm64": "7.4.
|
|
104
|
-
"@numkong/linux-x64": "7.4.
|
|
105
|
-
"@numkong/win32-arm64": "7.4.
|
|
106
|
-
"@numkong/win32-x64": "7.4.
|
|
101
|
+
"@numkong/darwin-arm64": "7.4.2",
|
|
102
|
+
"@numkong/darwin-x64": "7.4.2",
|
|
103
|
+
"@numkong/linux-arm64": "7.4.2",
|
|
104
|
+
"@numkong/linux-x64": "7.4.2",
|
|
105
|
+
"@numkong/win32-arm64": "7.4.2",
|
|
106
|
+
"@numkong/win32-x64": "7.4.2"
|
|
107
107
|
}
|
|
108
108
|
}
|