A library of dense linear algebra functions for AArch64 systems.
It provides a full BLAS/CBLAS interface and a subset of LAPACK routines, using strategies and optimized kernels selected at runtime.
- CMake 3.21 or newer
- A toolchain with the required C++ and AArch64 ISA support
- supported build compilers: GCC 14 and LLVM/Clang 22
- assembler support is required for
+sve,+fp16,+bf16, and+sme2 - compiler runtime support for the SME ABI
- other C++23-capable compilers may work
- A Fortran compiler for the Netlib reference sources
- Python 3.10 or newer with Mako and NumPy
make,find, andgit- OpenMP development support when building with
LINALG_THREADING_MODEL=openmp
- Linux and macOS on AArch64 are supported build/test platforms.
- Experimental Android arm64-v8a cross-compilation is available. See Android build instructions.
- Windows AArch64 support is experimental and assumes LLVM/Clang in a wenv/MSYS2-style environment.
- BLAS, CBLAS, and selected LAPACK routines are provided by default.
- Enable
LINALG_LAPACK_FALLBACKfor full LAPACK and LAPACKE support. - Fortran modules are not currently provided.
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install mako numpy
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallelThis builds the pl_linalg target.
BUILD_SHARED_LIBS=ON|OFF: builds shared or static libraries where supported. The default isOFF.LINALG_INTEGER_MODEL=lp64|ilp64: selects the public integer ABI. The default islp64.LINALG_THREADING_MODEL=serial|openmp: selects the threading backend. The default isserial.LINALG_REQUEST_MAX_THREADS=ON|OFF: always request the current maximum OpenMP team size. The default isOFF.LINALG_LAPACK_FALLBACK=ON|OFF: enables full LAPACK and LAPACKE support. The default isOFF.LINALG_BUILD_BENCHMARKS=ON|OFF: buildsproblem_context_bench. The default isOFF.LINALG_ENABLE_TUNING_OVERRIDES=ON|OFF: enables JSON tuning overrides. The default isOFF.LINALG_SANITIZER=none|address: selects sanitizer instrumentation. The default isnone.
Example:
cmake -S . -B build-openmp \
-DCMAKE_BUILD_TYPE=Release \
-DLINALG_THREADING_MODEL=openmp \
-DLINALG_INTEGER_MODEL=ilp64
cmake --build build-openmp --parallelctest --test-dir build --output-on-failureThis runs the Netlib BLAS and CBLAS test suites. With
LINALG_LAPACK_FALLBACK=ON, it also runs the LAPACK tests and LAPACKE examples.
cmake --install build --prefix /path/to/installThis installs the built pl_linalg library, its public headers, and license notices.
include/: public C headers and ABI typessrc/core/: problem contexts, interfaces, strategies, and shared linear algebra machinerysrc/kernels/: optimized AArch64 kernels and kernel generatorssrc/runtime/: CPU and system detectionsrc/dispatch/: runtime dispatch and generated selection sourcesnetlib/: imported Netlib reference sources and test integrationcmake/: top-level CMake build options
See CONTRIBUTING.md for contribution guidance.
This repository is licensed under either MIT or Apache-2.0 with LLVM exception. See LICENSE and LICENSES/.
Third-party source notices are listed in THIRD_PARTY_NOTICES.md.