vlang/vsl

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

What it solves

VSL provides a high-performance foundation for AI and scientific computing in the V language. It fills the gap for low-level mathematical primitives—such as linear algebra, numerical methods, and GPU acceleration—that are necessary to build complex machine learning models and scientific simulations.

How it works

VSL implements a tiered performance architecture. It offers pure-V implementations of BLAS/LAPACK routines for portability and ease of installation. For maximum performance, users can opt-in to optimized backends including OpenBLAS, LAPACK, CUDA (cuBLAS/cuDNN), Vulkan Compute, and OpenCL/VCL. It uses a unified vsl.compute dispatch API to allow downstream libraries (like VTL for neural networks) to access these hardware-accelerated primitives without needing to rewrite their logic for every backend.

Who it’s for

It is designed for developers using the V language who need to perform heavy numerical computation, build machine learning algorithms from scratch, or create scientific applications requiring GPU acceleration.

Highlights

  • Comprehensive Math Suite: Includes linear algebra (eigenvalue decomposition, solvers), numerical methods (differentiation, integration), and statistical analysis.
  • GPU Acceleration: Native support for CUDA, Vulkan, and OpenCL to handle computationally intensive operations.
  • ML Primitives: Provides the underlying compute kernels (GEMM, Conv2D, softmax, LayerNorm) used by neural network libraries.
  • Flexible Backends: Allows switching between pure-V, C-based, and GPU-accelerated implementations via compilation flags.
  • Scientific Data Support: Integration with HDF5 for handling large scientific datasets.

Related

  • Project
  • Project
  • Project
  • Project
  • Project