Python · Highlights

Highlights

8.0.0-rc.1 · b1f866ab

§ Ecosystem Comparison

FeatureNumKongNumPy/SciPyPyTorch
Operation familiesdots, distances, binary, probability, geospatial, curved, shapes, sparse, MaxSim, elementwise, reductions, cast, trigdots, distances, elementwise, reductions, some probability via cdistdots, distances, elementwise, reductions
PrecisionBFloat16 through sub-byte — Float8, Float6, Int4, packed bits; automatic widening; Kahan summation; 0 ULP in Float32/Float64Float16, partial BFloat16; no auto-widening; standard accuracyFloat16, BFloat16, partial Float8; explicit AMP required; standard accuracy
Runtime SIMD dispatchpicks the best ISA per call, from a capability mask, at runtime on x86, ARM, RISC-Vruntime, among a few compiled targets per loopCPU: compile-time; CUDA: runtime
Packed matrix, GEMM-likepack once, reuse across query batchesnp.dot/@ — no persistent packingtorch.mm — no persistent distance-oriented packing
Symmetric kernels, SYRK-likeskip duplicate pairs, up to 2x speedup for self-distancepdist computes one triangle; cdist recomputes bothX @ X.T recomputes both triangles
Output parameter out=Yes — all major entrypointsYes — most ufuncs and functions; SciPy: some functions onlyYes for torch.mm, torch.matmul; No for torch.cdist
Fast CPython calling conventionYes — direct METH_FASTCALLYes — vectorcall in 2.0+No — tensor dispatch overhead
GIL releasebatched, packed, and symmetric kernelssome ops onlymost ops