You need a working V installation. The pure-V path has no native dependencies; OpenBLAS, LAPACKE, CUDA and Vulkan backends are opt-in.
v install vsl v ~/.vmodules/vsl/examples/blas_basic_operations/main.v
Dense linear algebra lives in vsl.la. Start with matrices and solvers, then reach for vsl.fft, vsl.deriv and vsl.dist as your problem demands.
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
}
Continue with the installation guide and the examples catalog.
For hot paths, compile in prod mode and, where available, enable a native backend. Backend choice is always explicit — VSL never pretends a fallback ran on a GPU.
# build first, then execute — the pattern used by all VSL benchmarks
v -prod -o /tmp/bench ~/.vmodules/vsl/examples/blas_performance_comparison/main.v
/tmp/bench
Then browse the API reference and the ML roadmap.