Skip to content

Update dependency ashvardanian/simsimd to v7 (llms) - #215

Open
mcmarius wants to merge 5 commits into
llmsfrom
renovate/llms-ashvardanian-simsimd-7.x
Open

mcmarius wants to merge 5 commits into
llmsfrom
renovate/llms-ashvardanian-simsimd-7.x

Conversation

@mcmarius

Copy link
Copy Markdown
Owner

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Update Change
ashvardanian/simsimd major 6.5.13 → 7.8.2
ashvardanian/simsimd major v6.5.13 → v7.8.2

Release Notes

ashvardanian/simsimd (ashvardanian/simsimd)

v7.8.2

Compare Source

Release: v7.8.2 [skip ci]

Patch
  • Make: Probe ISAs through the QEMU emulator on cross builds (49454f6)
  • Make: Honour base-image pins and f16 checks under QEMU (07468b9)
  • Make: Bump RISC-V wheel images past a broken patchelf (0b183b3)
  • Fix: Keep streaming SVE bodies out of line on GCC (620a6c1)
  • Fix: Divide exactly in the batched Jaccard finalizers (da4f83e)
  • Improve: Separate runtime and compile-time feature checks in tests (e9eec9a)
  • Make: Test AArch64 under QEMU and ship RISC-V wheels (db3004c)
  • Fix: Pin the integer accumulator in the tensor sum test (572395b)
  • Fix: Unbreak AArch64 GCC builds of the SME runtime stubs (6bf57e2)
  • Fix: SVE weight pairing, stack overflow, and tree reduction at VL=384 (ca208ce)
  • Fix: Out-of-bounds read in the serial sparse intersection (7bccaf5)
  • Make: Normalize cross toolchains, route CI through them, unbreak RISC-V and MSVC ASAN (df0b8fc)
  • Fix: Zero-padded tails leaking into SVE2 sparse matches (9b19e23)
  • Make: Ship Pyodide, WASM64, s390x and armv7l, and move to cibuildwheel 4 (c7d1305)
  • Fix: Overly strict ARM DotProd and SME capability checks (4cd29e5)
  • Make: Bypass the main* ruleset on rebase, and bump actions (e51e23d)
  • Fix: Wrong hwprobe bit for Zvbb on RISC-V #​381 (b0d339e)

v7.8.1

Compare Source

Release: v7.8.1 [skip ci]

Patch
  • Make: Bump CI action versions (8f624f6)
  • Fix: Unbreak WASM builds on Clang 24 and WASI SDK 33 (dee3b84)
  • Docs: Kernel names, output types, links, & citations (8d96584)
  • Make: Unbreak release jobs and align the baseline table (fa59409)

v7.8.0

Compare Source

Release: v7.8.0 [skip ci]

Minor
  • Add: Native thread pools for Python and JavaScript bindings (0354de0)
Patch
  • Fix: Self-contained ISA headers (4383f44)
  • Make: Unbreak Windows, RISC-V, and SDE jobs (b9570af)
  • Make: Pin cibuildwheel to 3.x instead of 4.x (bfa7601)
  • Make: Unblock wheel builds on current cibuildwheel (96319ad)
  • Fix: Scatter cast writeback into a strided out (6500d1e)
  • Make: Wire WASI to CTest (648092d)
  • Improve: Allocation-free nk.astype for Python (d058a27)
  • Make: CMake option to enable AddressSanitizer (#​370) (b7a0d2f)

v7.7.1

Compare Source

Release: v7.7.1 [skip ci]

Patch
  • Improve: Report Umeyama scale as NaN for degenerate source (895742d)
  • Fix: Fast-math-safe float classification (b25666d)
  • Fix: Accumulate i4 angular bias correction in i64 on Icelake (f59c915)

v7.7.0

Compare Source

Release: v7.7.0 [skip ci]

Minor
  • Add: Rust trait reorganisation, bit reductions, macro purge (3121737)
  • Add: Tensor fill_zeros, fill, copy, popcount-style BitwiseReductions (0127460)
Patch
  • Fix: const friendly & rank-aware tensor ops (ef37cf9)
  • Improve: Harden tensor shapes against -flto (3eca0d2)
  • Improve: Accept any integral in sub_byte_ref::operator=, clamp out-of-range (f3004f6)
  • Improve: Collapse per-lane finalize args to one pointer-to-vec shape (a35ddcd)

v7.6.0: v7.6: CUDA & C++ 20 Compatibility, DLPack 1.3 Views, Float8 & 3D Mesh Speedups

Compare Source

CUDA & C++ 20 Compatibility

NVCC 13 caps its language-standard flag at C++20, and our multi-argument subscript overloads from C++23 P2128 made tensor.hpp unparseable by cudafe++. We added call-operator primaries that mirror every multi-argument subscript overload in the tensor view, span, and owning container types, and kept the bracket sugar behind an __cpp_multidimensional_subscript feature test so older toolchains pick the portable spelling automatically. Downstream CUDA callers now parse the tensor header without touching their language-standard flag.

DLPack & Zero-copy Exchange with PyTorch, JAX, & Arrow

Tensors now exchange zero-copy in both directions with every Python framework that implements the DLPack protocol — PyTorch, NumPy, JAX, CuPy, TensorFlow, PyArrow, MLX, ONNX Runtime, TVM, MXNet, NNabla — using DLPack 1.3's versioned capsules and the max_version handshake. This finally carries semantic dtype identity across the bridge: bf16 and the four narrow float variants E4M3FN, E5M2, E2M3, and E3M2 round-trip without losing their type, where PEP 3118 and the legacy array interface previously degraded them to raw unsigned bytes. The importer accepts every device whose pointer is host-dereferenceable — plain CPU, pinned host memory on CUDA and ROCm, CUDA managed unified memory, Intel oneAPI host and shared USM, and Metal on Apple Silicon — while pure device memory is rejected with the offending device code named. The exporter stays strict and only emits the CPU device. Sub-byte types u1, u4, and i4 ride as byte containers, and the ABI is declared inline as six structs and twelve device codes rather than vendoring an external header, mirroring NumPy's own approach. Validated against torch 2.11, numpy 2.4, jax 0.10, tensorflow 2.21, pyarrow 23, cupy 13.6, and onnxruntime 1.24 on H100 with 127 tests passing.

import numpy as np, torch, numkong as nk

# NumKong → PyTorch: zero-copy FP8 round-trip preserves dtype identity.
src = torch.zeros(4, 6, dtype=torch.float8_e4m3fn)
nk_view = nk.from_dlpack(src); pt_back = torch.from_dlpack(nk_view)
assert nk_view.shape == (4, 6) and nk_view.dtype == "e4m3" and pt_back.dtype == torch.float8_e4m3fn

# Mutation through one view is visible through the other — proves zero-copy.
tensor = nk.Tensor(np.arange(24, dtype=np.float32).reshape(4, 6)); pt = torch.from_dlpack(tensor)
pt[0, 0] = 99; assert np.asarray(tensor)[0, 0] == 99

Upstream DLPack PRs that this bridge interoperates with, already referenced from our DLPack interop source:

Faster Single-Pass 3D Mesh Alignment Algorithms

Kabsch/Umeyama mesh alignment now folds into a single pass via the trace identity

$$\mathrm{SSD} = \lVert a - \bar a \rVert^2 + \lVert b - \bar b \rVert^2 - 2,\mathrm{tr}(R \cdot H)$$

replacing the earlier two-pass approach — covariance first, transformed-SSD second — across all nine backends. An identity-dominant short-circuit skips SVD entirely when $H$ approximates a positive diagonal, saving around 500 cycles on already-aligned inputs. Two new backends land alongside: a Genoa kernel that uses VDPBF16PS for channel-grouped bf16 reductions, and a NEON+FP16FML kernel that uses vfmlalq for fp16 widening FMA, while the existing NEON+BFDOT path picks up vbfdotq_f32 for its bf16 stats pass. A centered-RMSD bug in the NEON and NEON+FP16FML paths is fixed in passing.

Faster Float8 Linear Algebra on x86

Pairwise FP8 distance kernels — sqeuclidean, euclidean, and angular — on Skylake and Haswell now compute the squared difference directly in F32 after a free-shift widen. E5M2 abuses its shared exponent bias with F16: a byte-to-word unpack against zero places the byte as a valid F16 encoding. E4M3 uses a Giesen-style fake-F16 cast that shifts the mantissa up by seven, reinjects the sign at bit fifteen, widens with vcvtph2ps, and multiplies by 256 to correct the bias delta. Per-pair speedups range from 1.4× for E4M3 angular on Skylake to 4.9× for E5M2 sqeuclidean on Haswell on a pinned Xeon 6776P. The redundant Genoa E5M2 pairwise kernels are deleted because the rewritten Skylake path runs on Genoa silicon and beats the old vdpbf16ps-chain form by 2.4×.

Stateful FP8 GEMMs follow the same trajectory. E5M2 byte-packs into a new dtype-specific update helper that runs two FMA chains into a single state accumulator, landing at 1.4–2.5× on Skylake and up to 3.2× on Haswell for the packed dot, angular, and euclidean variants. E4M3 GEMMs on Skylake switch to an asymmetric F16-pack scheme where A streams as F32 while B is pre-cast at pack time and stored as F16, halving packed-B memory with compute neutral against baseline. Granite Rapids gets a brand-new E5M2 GEMM that packs E5M2 into F16 with a single byte shift and runs TDPFP16PS over F16 tiles, beating the Sapphire AMX BF16 path on E5M2 inputs with better intermediate precision at the same throughput. Dispatch wires it ahead of Sapphire AMX so Granite hardware automatically picks it up.

Minor
  • Add: DLPack 1.3 interop bridge for numkong.Tensor (ea74fe1)
  • Add: Back-port tensor API to C++20 for CUDA (ad93068)
Patch
  • Improve: FP8 GEMM throughput on Skylake/Haswell + Granite Rapids E5M2 kernel (c19bec9)
  • Improve: FP8 pairwise distance kernels via Giesen trick + F16 widen path (679f55f)
  • Fix: Keep *_serial kernels scalar across LTO (455d535)
  • Make: Enable symbol exports for nk_shared Emscripten builds (482e4fd)
  • Improve: SSD trace-identity fold across all mesh backends + Genoa/NEONFHM kernels (e9d40e5)
  • Make: Normalize base PowerPC & LoongArch cap for JS (ab81191)

v7.5.0: v7.5: Parallelism & Portability

Compare Source

  • Built-in OpenMP bundling for JS & Python 🐍
  • Intel Granite Rapids 🪨 F16 → F32 GEMMs 💎
  • Faster bit-vector population counts for Arm NEON 🦾
  • SME compatibility with non-Apple Clang on Apple machines 🍏
  • Hardening against MSan SVE false-positives, thanks to @​alexey-milovidov 🦺
  • Hardening against GCC 13 Arm NEON code-gen bugs, thanks to @​swasik 🐂
  • _into & _parallel GEMM Rust APIs: reusing memory & ForkUnion pools 🆕
  • De-vectorize serial kernels with compiler flags 🎏
  • Compress source & binary distributions for Windows 🗜️
  • Pre-build & share FreeBSD, PowerPC, RISC-V, & LoongArch libs 🤗
Minor
  • Add: NEON popcount kernel for nk_reduce_moments_u1 (2181e0c)
  • Add: Tensor constructors, sealed trait family, div_ceil cleanup (2792279)
  • Add: Span-based matrix _into APIs, parallel Hammings/Jaccards, full-crate docs (99289df)
  • Add: OpenMP for Python & JavaScript (499ecc9)
  • Add: Granite Rapids AMX for F16 & F32 (28036ea)
Patch
  • Fix: Native ISA probe on Apple Clang + compile/runtime glyph (bc13e02)
  • Make: Detect illegal instructions in macOS CI (289cdaf)
  • Fix: Drop -march= on macOS setup.py builds (28aac74)
  • Fix: Exclude std::signal from WASM builds (14814c5)
  • Improve: Drop GNU statement-expression macros in SVE reduce helpers (b8b4ca0)
  • Make: Drop +nosimd from AArch64 baseline (23f5195)
  • Make: Forbid auto-vectorization in portable baseline builds (43e8324)
  • Make: Pin TU baseline to per-arch ABI floor across build systems (453ed5f)
  • Fix: Mitigate GCC 13 wrong BF16 splat in Arm NEON (#​346) (fc3d8ec)
  • Improve: Log faulting capability detection (a401f8a)
  • Improve: Log faulting kernel on fatal signals in nk_test (22c7c79)
  • Make: Normalize Python test dependencies across CI and docs (8a0f3d4)
  • Make: Baseline-only ISA for shared-library test, harden Windows CI (1907685)
  • Fix: Wrong compiler probes for SMEBF16 & SMEBI32 (8b19ddb)
  • Make: Log host CPU capabilities in macOS and Windows CI jobs (988eeb2)
  • Fix: Pre-declare OpenMP loop counter, universal libomp for macOS (493a021)
  • Fix: Use int for OpenMP loop counters, absolute libomp install name (ccc0118)
  • Fix: GCC requires +sme prefix in target attribute for _arm_sc* stubs (291dc0a)
  • Fix: Signed OpenMP iterators, source-built libomp, JS KMP guard (dc1ae75)
  • Fix: OpenMP wheel builds on macOS and Windows (f569121)
  • Fix: Add target("sme") to _arm_sc* stubs for GCC compatibility (ad2add0)
  • Fix: Unpoison SVE scalar reductions for MemorySanitizer (#​342) (b42eda7)
  • Improve: Move SME runtime stubs to types.h as weak inline definitions (64ca934)
  • Improve: Manual SME streaming control, single enter/exit per API call (6432837)
  • Fix: Update cdist edge-case test for re-added threads= kwarg (50681af)
  • Make: Allow force-enabling ISA targets via environment variables (0e58702)
  • Improve: Abandon F32→F64 via Ozaki on Granite Rapids (94a5f19)
  • Make: FreeBSD, PPC64le, LoongArch, RISC-V releases & compress Windows (a9a0d83)
  • Make: Standardize CI compilers and add Windows test job (9a22ea4)
  • Make: Shrink serial fallbacks with scoped size optimization (83154a8)
  • Make: Compress Windows builds (e30ad3d)
  • Fix: Streaming-compatible stubs for LLVM SME builds (0be7b2f)

v7.4.5: : Faster RMSD

Compare Source

  • Improve: Vectorize F32 SME MaxSim finalizer (0daacf3)
  • Improve: Remove centering from RMSD kernels (1a83ab4)
  • Fix: Emulated vs native test durations (4266451)

v7.4.4: : CI & MSVC Hardening

Compare Source

  • Fix: ARMv7 Rust cross-compilation with CC for versioned GCC (a5e67e6)
  • Make: check_source_runs-probing like march=native on MSVC (7a152f3)
  • Fix: Drop _MM_FROUND_NO_EXC from _mm256_cvtps_ph calls (8649b0c)
  • Fix: Guard against old MSVC preprocessor (25d3304)
  • Make: Enforce newer preprocessor in MSVC (be966af)
  • Make: Cleaner CIBW artifact names & env forwarding (a6cf642)
  • Make: Forward cross-compilation flags for macOS wheels (6ed3b8c)
  • Make: Split ppc64le, s390x, i686 CIBW runs (c01795c)

v7.4.3

Compare Source

Release: v7.4.3 [skip ci]

Patch
  • Fix: Require AArch64 for NEON kernels (2ba1b34)
  • Docs: Table order & formatting (8673a56)
  • Make: Avoid --all-features in Rust cross-compilation CI (8be8bff)
  • Improve: Arm32 compatibility (6404172)
  • Make: cancel-in-progress CI to shift compute resources (dfc8fa0)
  • Improve: Harden Swift SDK for 6.1+ toolkit (965cd52)
  • Make: Strip .unsafeFlags & list platforms for SPM consumption (b061b78)
  • Make: Expose CNumKongDispatch target to Swift users (6aa00a8)

v7.4.2

Compare Source

Release: v7.4.2 [skip ci]

Patch
  • Docs: Shrink tables in the main README (6d2ea34)
  • Make: Inline Power Shell cross-compilation logic in CI (974c30c)
  • Make: Define _ARM64_ for Arm JS builds in MSVC (f303042)
  • Make: Skip same-named artifacts on CI reruns (7c098e5)

v7.4.1

Compare Source

Release: v7.4.1 [skip ci]

Patch
  • Make: Set repository.url for NPM (385480d)
  • Make: Pull MSVC ARM64 Cross-Compiler (e20c93e)
  • Fix: Swap f16x8 for u16x8 in cast_neon (154ec5d)

v7.4.0: v7.4: Fast Tensor Contractions

Compare Source

  • Faster tensor contractions
  • Faster GEMM "packers" with SIMD
  • New SVE+SDOT kernels for i8
  • MSVC build stability on Arm
Minor
  • Add: WASM elementwise ops & spatial mini-float kernels (81b8c44)
  • Add: WASM type-casting kernels (e09df31)
  • Add: SVE+SDOT ops for 8-bit integers (913fc6b)
Patch
  • Fix: Misplaced NEON loads/stores in Sierra (05e3045)
  • Fix: Avoid unconsitional np symbols (9dffb68)
  • Make: Resolve probe locations for NPM consumers (c602f45)
  • Docs: Refined "What's Inside" (28f35cd)
  • Docs: Mini-float kernel selection strategy (04e6598)
  • Improve: Accelerate PyTests, reduce Decimal use (2417248)
  • Make: Move .pyi for PyLance (688ec2d)
  • Fix: Inconsistent SME function qualifiers (5b4148a)
  • Improve: Smaller test inputs under QEMU (ee36bf2)
  • Improve: Vectorize GEMM "packers" (86127a4)
  • Make: Longer timeouts for QEMU in CI (a9cc732)
  • Fix: vec_t store helper args order (eecbcac)
  • Fix: Negative stride tensor reductions (3ea81be)
  • Improve: Recursive stride collapsing and axis-lane fast paths for N-D reductions (cf8eaf6)
  • Improve: Faster reductions in strided tensors (61651ed)
  • Improve: Wider NEON curved, mesh, & probability F16 kernels (1c17678)
  • Fix: Harden mini-float type-casting (1911b89)
  • Make: Ship win32-arm64 NPM builds (578b7ad)
  • Make: Auto-bump JS platform-specific versions (5617f75)
  • Fix: vcombine instead of initializer lists for NEON arrays in MSVC (906c178)
  • Fix: Avoid flaky vld1_f16 for MSVC (7a987d2)

v7.3.0: v7.3: Hardened Arm Kernels, Upgraded CI, Citations, & Docs

Compare Source

This release hardens Arm kernels across NEON, SVE, and SME. The most widespread fix replaces _x (don't-care) predicated intrinsics with _m (merge-with-zero) variants — inactive lanes left undefined by _x could carry stale data into reductions, producing wrong results for non-power-of-two dimensions on real SVE hardware. Partial-tail padding in BMOPA is fixed for sub-32-bit types, and strided reductions in NEON are hardened against off-by-one in non-contiguous layouts.

Thanks to the @​ClickHouse team for help hardening tail loads and @​Albumentations-team for strided reductions!

On the performance side, NEON gets faster in-vector finalizers, vcvt_high for cheaper F16/BF16 widening, and new SDOT fallbacks for i4 and e3m2 that previously required SME — bringing sub-byte arithmetic to the much larger NEON install base. Streaming SVE picks up Giesen's trick for E4M3 → F16 and faster mini-float norms. SME GEMMs use fewer branches in the inner loop.

Also, NumKong now ships a CITATION.cff — hit "Cite this repository" on GitHub to grab it in case you are writing a paper on a related topic 🤗

Minor
  • Add: NEON & SDOT fallbacks for i4 & e3m2 (0c6afa5)
Patch
  • Docs: M5 perf stats for Wasmtime v43 (43c2881)
  • Fix: Alternative MSVC-friendly cast (4744b9b)
  • Make: Disable LTCG due to MSVC issues (3d37684)
  • Make: Try PREBUILDS_ONLY=0 in CI (64c5f95)
  • Improve: Lower NEONHALF → NEON requirements (37f99ec)
  • Fix: Wire nk_cast_neon benchmarks (3793af2)
  • Docs: Apple M5 native stats for secondary workloads (d7c81c4)
  • Improve: Faster in-vector 4-way finalizers in NEON (968dcd1)
  • Improve: Drop nk_f16x4_to_f32x4_neon (84bb20a)
  • Improve: vcvt_high for faster unpacking (a5f4a19)
  • Docs: Refresh GEMM/SYRK measurements Apple M4 → M5 (3e010de)
  • Fix: Harden strided reductions in NEON & AVX2 (61ac67b)
  • Fix: Double-counted tail in Skylake f64 RMSD, Kabsch, and Umeyama (5391344)
  • Improve: Share decimal.Context.traps rules (3c28ae9)
  • Fix: Padding partial tail 32-bit words for BMOPA (2598487)
  • Fix: Missing scale type definitions of mini-floats (91862da)
  • Fix: Scalar buffer cast internal overwrites & aliasing (7b0e129)
  • Fix: Top-bottom variable names (a014134)
  • Improve: Giesen's E4M3 → F16 in Streaming SVE (25322b5)
  • Improve: Fewer branches in SME GEMMs (858263c)
  • Fix: Up-round dimensions count in sub-byte C++ tests (87a72d0)
  • Make: Focus on M4 CPUs for SME probing (5ff63eb)
  • Improve: PyTesting across more shapes (4bc3e44)
  • Improve: Cleaner type-casting & promotion rules (23c2474)
  • Make: Hide formatting commits for v7-7.2 (f6ce2da)
  • Make: Native addon resolution for Deno & Bun (0d502d5)
  • Docs: Citations (6220137)
  • Improve: Faster mini-float norms in Streaming SVE (088de57)
  • Make: Integrate PyRight (0fe56c0)
  • Fix: F16 norms in SSVE skipped odd entries (bf3bfee)
  • Fix: Harden SVE MaxSim upcasting logic (803eb33)
  • Fix: Disable FPCR.AH bit (7b2b850)
  • Make: Node 24 for trusted publishing (9f1a4ef)
  • Fix: _m to zero-out predicated SVE/SME ops (16c157b)
  • Fix: _m to zero-out predicated SVE lanes in spatial/ (ac27cde)
  • Make: Replace stale prebuildify (74c5454)

v7.2.4

Compare Source

Release: v7.2.4 [skip ci]

Patch
  • Make: 2h timeout budget for JS & Py builds (2e8f081)

v7.2.3

Compare Source

Release: v7.2.3 [skip ci]

Patch
  • Fix: Harden implicit narrowing casts (319fae2)
  • Fix: Negating unsigned integers in MSVC (9be61e3)
  • Make: Retry flaky CI jobs (b622d63)
  • Make: Remove conflicting NEON probes (c0f3573)

v7.2.2

Compare Source

Release: v7.2.2 [skip ci]

Patch
  • Make: Trusted publishing for NPM (9578271)
  • Improve: VNNI spatial kernels for E2M3, E3M2, & E4M3 (02d5325)
  • Fix: NK_TARGET_NEON auto-detect in MSVC (4ad2124)

v7.2.1

Compare Source

Release: v7.2.1 [skip ci]

Patch
  • Improve: Listing compile-time capabilities (0e9f04a)
  • Improve: Flush Float16 sums in spatial/ Float6 kernels (52606b0)
  • Make: Slimmer NPM packages per platform (0a18afc)
  • Improve: Lower E4M3 Genoa to Icelake with 40% gains (8ade366)

v7.2.0: v7.2: FP8 on Arm, AVX 10.2, IBM Power 9+ VSX, & LoongArch LASX 🤗

Compare Source

Nvidia just unveiled Arm-based Olympus cores and Vera CPUs with native support for 8-bit floating-point numbers (FP8). Intel's Xeon 7 Diamond Rapids and Nova Lake CPUs with FP8 may arrive even sooner through the new AVX 10.2 extensions. FP8 arithmetic is at the heart of modern LLM inference, but most of the world's CPUs don't have it yet. NumKong v7.2 bridges that gap — native FP8 on the new chips, efficient emulation on everything else — so more global infrastructure is ready for AI workloads sooner.

Among subtler improvements, NumKong no longer touches the FTZ/DAZ flags. We previously needed them to avoid devastating performance cliffs when a denormal slipped into a register — few people know, but a single denormal input makes Fused-Multiply-Add on x86 25-35x slower for the entire vector. Since v7 the codegen avoids producing denormals altogether, so we now drop FTZ/DAZ and leverage the new behavior for 15% faster FP8 upcasts to FP32 and BF16 on older CPUs using Giesen's magic-number trick.

This release also adds VSX extensions for IBM's Power 9, 10, and 11 CPUs and native support for LoongArch, widely deployed across China's government sector. A single API across all these architectures means seamless CPU-to-CPU interop, whether you're moving workloads between a decade-old Haswell rack and a Diamond Rapids node or between Power10 and Loongson. From 4- and 6-bit integers and floats to roughly 118-bit custom numerics, this is shaping up to be one of the more portable performance libraries out there.


  • Remove FTZ/DAZ overrides for broader x86/Arm compatibility
  • LoongArch support with LASX 256-bit SIMD extensions
  • AVX 10.2 with FP8 support with Intel Xeon7 - Diamond Rapids
  • Arm NEON FP8 for Nvidia Olympus cores and Vera CPUs
  • IBM backend with VSX 128-bit SIMD for Power 9, 10, & 11
  • Faster E4M3 emulation on older x86 and Arm CPUs
  • Leveraging "Extended BF16" feature on Arm CPUs
Minor
  • Add: sets/ kernels for LASX (34d3d67)
  • Add: Loongson F16 kernels (1a81142)
  • Add: Power9+ ISA backend (176bbe2)
  • Add: Diamond Rapids backend (b3136e3)
  • Add: LAPX kernels for LoongArch (565a847)
  • Add: Infra for Loongson, Power, Diamond, NEON FP8 (5577261)
  • Add: NEON+FP8 kernels for Olympus (22048ac)
Patch
  • Make: Extended BF16 support on Arm (70d6ca2)
  • Make: numkong.gypi interface for downstream addons (2b97a6b)
  • Make: Resolve CMake probes for git-submodule users (772720f)
  • Make: Expose cargo:include & links for USearch & downstream users (7e58e9f)
  • Fix: Broken Arm probes in AppleClang (7b88998)
  • Improve: Giesen's trick for F8 upcasts on NEON & RVV (b2f8faa)
  • Fix: Missing wrong enum for LoongArch (c869f3f)
  • Improve: __attribute__((may_alias)) for punning unions (5945372)
  • Fix: Pre-pack F16 as F32 for serial GEMMs (f51f7f0)
  • Improve: Wider bf16 GEMMs without pre-upcast (26bc2fa)
  • Improve: 2x wider GEMM steps on LASX (f164c4a)
  • Docs: More stable SPR perf numbers for floats (33531da)
  • Fix: __loongarch_lasx flag doesn't exist (d57740e)
  • Docs: New "What's Inside" tabular guide (e9d0b19)
  • Fix: Algrebaic transform for i8×u8 dot instructions (5a2e677)
  • Fix: vec_mergeh upcasts in VSX (7ae8b6b)
  • Improve: Faster conversions & reductions in LoongArch (661426d)
  • Improve: Faster widening in WASM (695da36)
  • Improve: Giesen's trick for F16→F32 upcast (708770e)
  • Make: <(module_root_dir) to trace probes for JS (e051236)
  • Fix: Additive "power9-vector" flags (c8555c2)
  • Improve: Transpose in finalizers on Power (1dbd881)
  • Improve: cpu=power9 & partial loads/stores (670767d)
  • Make: SYSROOT for PowerPC & LoongArch (cde23a2)
  • Make: Wire new probing into NPM preinstall (9319969)
  • Make: Unified ISA probes for C, Rust, Py, & JS (6fea738)
  • Improve: Detect Arm features in header-only builds (24cbffb)
  • Improve: More accurate sqrt on LoongArch (7a45af6)
  • Improve: Avoid flaky x86 ph load intrinsics (4369262)
  • Improve: .inst syntax for MRS checks on old compilers (2080b1b)
  • Fix: AVX10.2 & NEON FP8 auto-detection (410e1fc)
  • Make: Power9 flags for build, 10 for CI (e33f779)
  • Make: Ignore "-Wstringop-overflow" for SYRKs (b9509d6)
  • Fix: Missing <lsxintrin.h> include for __m128i for LoongArch (c5282d1)
  • Improve: Test out= Python args (243c824)
  • Improve: Multi-axis reductions in Python (0c30deb)
  • Improve: 15% faster E4M3 upcasts (452e563)
  • Improve: Compare to BNNS in Accelerate.framework (6b1f57b)
  • Make: Downgrade Diamond Rapids CI to Granite (2e03e7e)
  • Fix: Type-casting issues on LoongArch (636549f)
  • Fix: Avoid changing FTZ/DAZ settings (2ce09b8)

v7.1.1: : SME & SVE Hardening, JS Builds

Compare Source

  • Improve: Smaller TensorError state (c5475be)
  • Improve: Apply StorageElement to every operation class (9806481)
  • Improve: Drop redundant NEON MinMax in FHM & BFDOT files (96c869f)
  • Improve: Simpler i4 dot-product in NEON (bf61c2c)
  • Docs: Apple M5 instruction timings & x86 refresh (835ae52)
  • Fix: Fill only upper triangle in other SME kernels (2a93c30)
  • Fix: Filling only upper triangle in u1_smebi32 kernels (68f5963)
  • Fix: Harden SME streming behaviour (8fe8cc9)
  • Improve: Generalize reductions to NumPy inputs (3660de5)
  • Fix: Missing "SME BI32" capability checks & routing (9168efb)
  • Make: Comp-time probe SME features to test/bench on MacOS (3ecbbf6)
  • Improve: Cleaner SVE post-processing in curved/ (f88d9e0)
  • Make: Bump CI versions (de4f0d0)
  • Make: Forward NPM_TOKEN for NPM uploads (0c81b88)

v7.1.0: v7.1: Tensor Ergonomics in Rust, Python, & C++

Compare Source

  • Zero-copy Tensor exchange in Python, Rust, & C++
  • std::format & core::fmt::Display for Rust & C++
  • Tensors & multi-dimensional iterators for sub-byte types
  • Documenting Python reductions along an axis=
  • Faster dtype= hints resolution in CPython binding
  • Upgraded CI for Clang cross-compiled binaries
  • Compiling SME feature checks with old Assembler
  • Simplify WASM backend usage in browsers
Minor
  • Add: nk::cast & reduction helpers for C++ (80ff0b0)
  • Add: Printing individual nk::vector dimensions (af719c7)
  • Add: Half-precision mesh/ kernels in AVX-512 (09c3a79)
  • Add: Sub-byte iterators for C++ tensors (7b0268e)
  • Add: Rust AllClose, MinMaxResult, & new tensor iterators (45fcc12)
  • Add: Sub-byte aware iterators for Rust (b0042f3)
  • Add: std::format for mini-floats (b1427e5)
  • Add: Addressing CUDA memory in Rust with from_raw_parts (39449a3)
  • Add: Zero-copy Tensor views in Python (5c035f8)
  • Add: CustomStringConvertible for Swift types (75d63ce)
  • Add: Basic logging for JS types (c0ab748)
  • Add: Basic std::formatter for C++ users (bdb4e73)
Patch
  • Docs: Math blocks, browser install, & wording (ee5e5c9)
  • Fix: Preserve accumulator for inactive lanes with *_m SVE intrinsics (cea24e9)
  • Fix: sqeuclidean_bf16_svebfdot predicate mismatch (f33fdb2)
  • Fix: Avoid F16 logic for integer FMA ops (a02cf13)
  • Fix: Missing entries in SVE nk_dot upcast paths (148b644)
  • Fix: Losing entries in svehalf upcasts (5e67f71)
  • Make: Bundle numkong-browser.ts for WASM in browsers (564108f)
  • Fix: Broken dot_f16_svehalf predicated loads (20cfec2)
  • Fix: .inst encoding for SME mrs check (d6c36d8)
  • Improve: Standardize error bounds in PyTest (e2f957a)
  • Fix: try_pack_transposed_in (10593e9)
  • Fix: #include <unistd.h> to enable ARM capability detection on Linux (#​320) (ae5413c)
  • Improve: Single-pass mesh/ for NEON, RVV, & WASM (a63bb19)
  • Improve: Reuse type-casting infra in Mesh PyTests (adf19a5)
  • Fix: Expose Mesh half-precision kernels to Python (ee3ebd6)
  • Fix: dtype=None guessing in Python packing functions (1eca237)
  • Improve: __forceinline for MSVC (d34221d)
  • Fix: Missing dimensions_per_value symbol (c2f132d)
  • Make: Bump to macOS 26 for SME in Py wheels (674778b)
  • Fix: Raise TypeError for wrong dtype= (cfb3973)
  • Docs: Refresh repo links & intro tables (1b55303)
  • Fix: String(_:radix:) init uses uppercase: instead of lower (4042a27)
  • Improve: Cheaper string checks in CPython layer (d944197)
  • Improve: Cheaper dtype= hints (13d87d2)
  • Improve: Interfaces for ml_dtype-like mini-floats (0518c6f)
  • Docs: Explain existing axis= args for Python (21d38bd)
  • Fix: Simpler (more stable) test for RMSD in Rust (6053276)
  • Improve: Consistent try_close in Rust (855fe86)
  • Improve: FusedIterator for Rust containers (ee0e42c)
  • Improve: Cleaner Debug vs Display style difference in Rust (ed852e4)
  • Make: Include *.hpp into the header-only lib (92ef022)
  • Improve: Iterators for vector_view & vector_span (c2d921b)
  • Improve: From trait for mini-floats (43059b3)
  • Fix: core::fmt::Display doesn't need "std" (fd96161)
  • Docs: Broken links & versions (707b065)
  • Make: Cleanup Release CI warnings (7bf755e)
  • Make: Windows & Arm cross-compilation issues (5d48227)
  • Make: Bump Clang for Debian builds in CI (6d86870)
  • Make: Exclude READMEs from Crate (a3c904d)
  • Make: Skip Swift benchmarks in CI (a5f9c60)
  • Make: Move Swift benchmarks (f1a6a87)

v7.0.0: v7: 2'000+ Mixed Precision Kernels 🦍

Compare Source

What started as a straightforward optimization request from the @​albumentations-team — improving element-wise operations between equi-dimensional arrays — snowballed into the largest piece of open-source work I've done in years. 200K+ lines of SIMD across 2'000+ kernels:

  • targeting every major vector ISA, grouped by platform and shape — x86 AVX2 vectors on Haswell, Alder Lake, Sierra Forest · x86 AVX-512 vectors on Skylake, Ice Lake, Genoa, Sapphire Rapids, Turin · Intel's fixed-shape tiles on Sapphire Rapids, Granite Rapids · Arm's fixed-width vectors via NEON, NEONHalf, NEONBFDot, NEONSDot · Arm's variable-width vectors via SVE, SVEHalf, SVEBf16, SVE2 · Arm's variable-shape tiles via SME, SMEF64, SMEBI32 · RISC-V's variable-width vectors via RVV, RVVHalf, RVVBf16, RVVBB · WASM's fixed-width vectors via V128Relaxed,
  • going far beyond the original already non-trivial vector-vector angular distances — GEMM-like many-to-many dot-products and similarity measures · SYRK-like distances within a batch of vectors · point-to-point Haversine and Vincenty distances · mesh-to-mesh RMSD, Kabsch, & Umeyama distances in 3D · doc-to-doc MaxSim & MinHash scoring · vector-matrix-vector Bilinear forms and Mahalanobis distances · scalar arithmetics, trigonometry, reductions, and type-casting,
  • across a superset of numeric types found in modern CPUs and GPUs — bits and nibbles like u1, u4, i4 · mini-floats like e2m3, e3m2, e4m3,e5m2 · half-precision floats like f16, bf16 · classics like i8, u8, f32, f64, and their complex counterparts,
  • implemented in C99, fully exposed to C++23, Python 3, & Rust, with initial support for Swift, JS, and Go!

More importantly for downstream consumers like USearch — and by extension, a good chunk of modern DBMS, cloud, and AI products worldwide — this release is a massive hardening effort. Some operations may run 5x slower than BLAS implementations like Intel's MKL, but they are also 50–100x more accurate where it matters, employing numerically stable algorithms to avoid catastrophic cancellation in floating-point and to saturate integers correctly.

NumKong+StringZilla banner

A full rewrite 8x the size of the original projec

❗ Important

✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

renovate-bot and others added 5 commits September 24, 2026 00:24
set_compiler_flags() compared the value of the RUN_SANITIZERS keyword against
the literal string "TRUE", so callers that pass an option variable, e.g.
`RUN_SANITIZERS ${USE_ASAN}` (which expands to ON/OFF), never matched and the
sanitizer flags were silently dropped: CI jobs configured with -DUSE_ASAN=ON
built and ran completely uninstrumented binaries.

Use a real boolean test so that ON/OFF, TRUE/FALSE and 1/0 all behave as
expected. Omitting RUN_SANITIZERS still defaults to running the sanitizers.
Recent glibc implements tcsetattr() through the termios2 ioctl, so memcheck no
longer reports the syscall parameter as ioctl(TCSETS) but as ioctl(generic),
and it additionally reports an 8 byte read of an uninitialized value inside
___cbaud_to_speed(). Both come from libraries that ignore the return value of
tcgetattr() and then hand the untouched struct termios to tcsetattr(), which
happens whenever stdin is not a tty (e.g. when the executable is fed from a
file in CI).

Add narrow suppressions for these call stacks so scripts/run_valgrind.sh keeps
passing on recent distributions. The existing entry is kept as is, since it is
what older distributions used to report.
v7 is the release in which simsimd was renamed to NumKong (the GitHub repository
redirects there): the headers moved from include/simsimd to include/numkong and
the symbols are prefixed with nk_ instead of simsimd_. There is no compatibility
layer, so the Renovate GIT_TAG bump alone does not compile.

Changes needed by the embeddings example:
- cos was renamed to angular (same value: 1 - cosine similarity)
- f32 inputs now return f64 results, so the distance is nk_f64_t
- the value printed by the example is a distance, not a similarity, so the
  label was fixed while touching those lines

NK_NATIVE_F16 / NK_NATIVE_BF16 replace the SIMSIMD_NATIVE_F16 / SIMSIMD_NATIVE_BF16
defines that were required in v6, locally and in CI.

Verified locally with GCC 16 (Debug, warnings as errors): ASan+UBSan run, valgrind
(0 errors, 0 lost bytes), cppcheck, clang-tidy, and clang 23 / GCC 15 compiles.
The _deps cache key ends in the CPR_VERSION env var, which is not defined anywhere,
so bumping a dependency does not invalidate the cache. Until that is fixed on
descarcare-date-api, add a version env var for the other FetchContent dependency of
this branch, so a NumKong bump always rebuilds _deps.

The annotation uses the same depName as the ones in CMakeLists.txt and README.md, so
Renovate updates all three in a single PR and the version cannot drift.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants