VSL v0.2.0-beta.1

The scientific engine under V computing.

VSL is the V Scientific Library — linear algebra, FFT, statistics, differentiation, optimization and machine-learning primitives, with SIMD kernels and optional OpenBLAS, LAPACKE, CUDA and Vulkan backends. It is the backend that powers VTL tensors.

02π sin(x)cos(x)
fig. 1 — elementary functions, f64vsl.fun · vsl.fft

Linear algebra in a dozen lines

Matrices, solvers and decompositions with a typed API — no C toolchain required for the pure-V path.

# install the module
v install vsl

// main.v — build and read a matrix
import vsl.la as la

fn main() {
    mut a := la.Matrix.new[f64](2, 2)
    a.set(0, 0, 1.0)
    a.set(1, 1, 2.0)
    println(a.get(1, 1)) // 2.0
}

Follow the full getting-started guide →


One library, the whole scientific stack

VSL is organized as focused modules that compose — the same kernels serve direct users and VTL's tensor operations.

Linear algebra & BLAS

vsl.la, vsl.blas and vsl.lapack: dense matrices, solvers, least squares, eigensolvers — SIMD-vectorized pure-V kernels with optional OpenBLAS/LAPACKE acceleration.

vsl.la →

Transforms & calculus

vsl.fft for spectral work, vsl.deriv and vsl.diff for numerical differentiation (GSL-inspired), plus integration and interpolation helpers.

vsl.fft →

Statistics & ML primitives

vsl.dist, vsl.metrics, vsl.ml and vsl.model_selection: distributions, histograms, evaluation metrics and classic model building blocks.

vsl.ml →

Geometry & quaternions

vsl.gm and quaternion support for 3D work, alongside graph algorithms in vsl.graph and data I/O in vsl.inout.

vsl.gm →

Accelerators

Optional CUDA and Vulkan compute paths, MPI parallelism, and a multi-backend compute layer — enabled explicitly, never silently assumed.

GPU guide →

The tensor frontend

VTL builds N-dimensional tensors, autograd and neural networks on top of these kernels — NumPy/PyTorch-style computing with VSL underneath.

VTL website →

Performance, measured

Paired GEMM measurement on a Ryzen 9 5900X, 2 threads: VSL with OpenBLAS 0.3.34 against the NumPy 2.5.3 wheel. Builds differ, so read this as a GEMM sample — the full benchmark suite is in the repository.

1.43 ms
VSL + OpenBLAS — 512×512 GEMM (NumPy: 2.11 ms)
8.47 ms
VSL + OpenBLAS — 1024×1024 GEMM (NumPy: 17.38 ms)
1.9×
SIMD vs scalar f64 unit-stride dot, 1M elements, -prod build

Method: compile with -prod first, then execute the binary — never v run for timings. Reproduce from the benchmarks directory.


Where VSL is heading

The ML roadmap tracks the march toward a complete scientific backend for VTL: broader decompositions, correctly-rounded elementary functions, operator coverage for every public struct, and Enoki-style SIMD data layouts for hot kernels.

Read the ML roadmap → · Open issues →