vlang/vsl

V library to develop Artificial Intelligence and High-Performance Scientific Computations

What it solves

VSL (The V Scientific Library) provides a comprehensive, high-performance foundation for scientific computing and machine learning within the V programming language. It addresses the need for efficient numerical operations, linear algebra, and hardware-accelerated computation without requiring complex external dependencies.

How it works

VSL is designed with a modular architecture that separates high-level mathematical routines from low-level compute backends. It offers a "pure V" implementation for portability and performance, while allowing developers to opt into hardware-specific acceleration (CUDA, Vulkan, OpenCL) via simple compiler flags. It serves as the compute engine for the VTL (V Tensor Library), which handles higher-level neural network abstractions like tensors, autograd, and training loops.

Who it’s for

This library is for developers building scientific applications, data analysis tools, or machine learning models in V who need both CPU-based numerical stability and the option for GPU-accelerated performance.

Highlights

  • Comprehensive Math: Includes linear algebra, numerical differentiation, integration, root finding, and statistical analysis.
  • Flexible Backends: Supports pure V, C BLAS/LAPACK, OpenCL, Vulkan, and CUDA for compute-intensive tasks.
  • Unified Compute API: Provides a backend-agnostic dispatch layer (vsl.compute) for consistent performance across different hardware.
  • ML Ready: Powers the VTL ecosystem, providing the necessary primitives for neural network layers, activations, and optimization algorithms.

Related

  • Project
  • Project
  • Project
  • Project