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
| Goal | Read |
|---|---|
| Install VSL and run the first example | Installation and Setup |
| Learn the core scientific APIs | Basic Linear Algebra, BLAS Basics |
| Build ML pipelines with VSL algorithms | Data Preparation, Clustering, Regression, Classification |
| Train tensor/autograd neural networks | VTL |
| Use GPU backends | OpenCL, CUDA, Vulkan |
| Compare performance | Benchmarks, vs NumPy |
| Track the ML release | ML Roadmap |
Learning Paths
Beginner Path
Start here if you're new to VSL or scientific computing:
Intermediate Path
Build on the basics with more advanced topics:
Advanced Path
Master advanced techniques and integrations:
- MPI Parallel Computing
- OpenCL GPU Acceleration
- CUDA GPU Acceleration
- Vulkan Compute Backend
- HDF5 I/O
- Library Integration
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:
- Data Preparation
- Clustering
- Regression
- Classification
- Logistic Regression
- Support Vector Machines
- Decision Trees
- Random Forest
Scientific Computing
Numerical methods and signal processing:
Advanced Topics
High-performance and specialized topics:
- MPI Parallel Computing
- OpenCL GPU Acceleration
- CUDA GPU Acceleration
- Vulkan Compute Backend
- HDF5 I/O
- Library Integration
GPU Backend Quick Reference
| Backend | Build flag | Current role | Docs |
|---|---|---|---|
| Pure V | none | Portable scientific computing | README |
| C BLAS/LAPACK | -d vsl_blas_cblas, -d vsl_lapack_lapacke | Optimized CPU linear algebra | Linear algebra |
| OpenCL/VCL | module-specific | Cross-vendor GPU kernels and examples | OpenCL GPU |
| CUDA | -d cuda | cuBLAS/cuDNN kernels for NVIDIA GPUs | CUDA README |
| Vulkan | -d vulkan | GEMM, Conv2D im2col, elementwise ops, fused Adam | Vulkan 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.