VSL Documentation

June 1, 2026 ยท View on GitHub

Welcome to VSL, the scientific computing foundation for V and the low-level compute layer used by VTL for ML workloads.

Use this page as the stable navigation hub for tutorials, examples, GPU backend docs, benchmarks, and release status.

Start Here

GoalRead
Install VSL and run the first exampleInstallation and Setup
Learn the core scientific APIsBasic Linear Algebra, BLAS Basics
Build ML pipelines with VSL algorithmsData Preparation, Clustering, Regression, Classification
Train tensor/autograd neural networksVTL
Use GPU backendsOpenCL, CUDA, Vulkan
Compare performanceBenchmarks, vs NumPy
Track the ML releaseML Roadmap

Learning Paths

Beginner Path

Start here if you're new to VSL or scientific computing:

  1. Installation and Setup
  2. Your First Plot
  3. Basic Linear Algebra
  4. Quick Reference

Intermediate Path

Build on the basics with more advanced topics:

Advanced Path

Master advanced techniques and integrations:

Tutorial Categories

Getting Started

Essential tutorials for beginners:

Linear Algebra

Matrix operations, BLAS, and LAPACK:

Visualization

Creating plots and charts:

Quaternions

3D rotations and orientations:

Machine Learning

ML algorithms and data processing:

Scientific Computing

Numerical methods and signal processing:

Advanced Topics

High-performance and specialized topics:

GPU Backend Quick Reference

BackendBuild flagCurrent roleDocs
Pure VnonePortable scientific computingREADME
C BLAS/LAPACK-d vsl_blas_cblas, -d vsl_lapack_lapackeOptimized CPU linear algebraLinear algebra
OpenCL/VCLmodule-specificCross-vendor GPU kernels and examplesOpenCL GPU
CUDA-d cudacuBLAS/cuDNN kernels for NVIDIA GPUsCUDA README
Vulkan-d vulkanGEMM, Conv2D im2col, elementwise ops, fused AdamVulkan README

VSL owns compute kernels and backend dispatch. For tensors, autograd, datasets, layers, losses, optimizers, and training examples, use VTL.

Quick Reference

Common Operations

Create a plot:

import vsl.plot

mut plt := plot.Plot.new()
plt.scatter(x: [1, 2, 3], y: [4, 5, 6])
plt.show()!

Matrix multiplication:

import vsl.blas
// Use BLAS dgemm for matrix multiplication

Quaternion rotation:

import vsl.quaternion
import math

q := quaternion.from_axis_anglef3(math.pi / 2, 1, 0, 0)

Examples

All tutorials include links to working examples in the examples/ directory. Each example includes:

  • Complete source code
  • Detailed README
  • Expected output descriptions
  • Troubleshooting tips

For a curated catalog, see examples/README.md.

Contributing

Found an error or want to improve a tutorial? See our Contributing Guide.