Send Feedback
Skip to content

The BLAS Module in KDB-X

This page provides an overview of what the BLAS module is, what libraries it supports, and when to use it.

BLAS (Basic Linear Algebra Subprograms) is a specification that provides a set of low-level routines for performing common linear algebra operations, such as vector addition, scalar multiplication, dot products, linear combinations, and matrix multiplication.

The BLAS module provides q bindings to industry-standard BLAS libraries, allowing you to perform high-performance linear algebra operations directly from q.

It’s distributed as part of the fusionx module and integrates seamlessly into the KDB-X ecosystem.

BLAS libraries are highly optimized for vector and matrix computations. By using the BLAS module, q developers can offload compute-intensive operations like vector addition, scalar products, and matrix multiplications to efficient C/Fortran implementations, maximizing performance on modern hardware.

Key features

  • Seamless integration with KDB-X and q workflows
  • High-performance routines for vector and matrix arithmetic
  • Hardware acceleration via optimized BLAS libraries
  • Extensible design — works with different BLAS backends across platforms

Supported BLAS libraries

The module can interface with any compatible BLAS implementation, including:

  • OpenBLAS – open-source, cross-platform
  • Intel MKL – highly optimized for Intel architectures
  • ATLAS – automatically tuned linear algebra software
  • BLIS – modern, modular BLAS framework
  • Apple Accelerate – macOS built-in BLAS
  • AMD AOCL – optimized for AMD CPUs
  • Netlib BLAS – reference implementation

Typical use cases

Use cases for the BLAS module include:

  • Scientific and financial computations requiring fast vector/matrix operations
  • Data analytics pipelines with linear transformations
  • Accelerating machine learning algorithms written in q
  • Integrating q with C/Fortran numerical routines

Next steps

  • See the BLAS documentation on GitHub for more information on API references and how to install and update the module.