Skip to content

Integrate configurable BLAS and LAPACK backends #40

Open

Description

@LunaStev

Parent roadmap: #1. Source checklist area 36 (15 requirements).

Motivation

BLAS and LAPACK can provide established dense linear algebra kernels and solvers for HMath consumers. Their integer widths, layouts, thread controls, and error conventions need a consistent adaptation layer with a usable pure fallback.

Current baseline

The Cabal package depends only on base, and dot products and matrix multiplication use Haskell lists. No BLAS/LAPACK provider detection, linking, dispatch, or adapter exists.

Scope

  • BLAS levels 1, 2, and 3
  • AXPY, DOT, and NRM2
  • GEMV and GEMM
  • Complex BLAS
  • Batched GEMM and strided batched GEMM
  • LAPACK linear solvers
  • LU, QR, SVD, eigenvalue decomposition, Cholesky, and least squares
  • OpenBLAS, BLIS, oneMKL, and Accelerate
  • Runtime backend selection
  • LP64 and ILP64
  • Error-code conversion
  • Layout conversion
  • Thread control
  • Performance benchmarks
  • Pure fallback

Completion criteria

  • Compare backend kernels and solvers with reference results using layout, transpose, complex-data, and dimension-edge cases.
  • Verify factorization reconstruction and solve residuals, including singular or invalid inputs and converted backend error codes.
  • Test configured provider availability, runtime selection, integer-width compatibility, thread controls, and fallback behavior.

Compatibility

This is a functional-area development backlog. The mandatory 1.0.0 release subset is not yet agreed; inclusion in the planning milestone does not make every item a release blocker. Preserve existing callers where practical and record deliberate API/ABI changes before implementation. Share overlapping primitives with the other roadmap areas and link smaller implementation issues here as work is selected.

Activity

  1. added this to the 1.0.0 milestone on Oct 27, 2026
  2. added
    enhancementNew feature or request
    trackingBroad feature area with an explicit implementation checklist.
    performanceCPU, SIMD, BLAS, GPU, parallelism, and benchmarks.
    priority lowLater capabilities after correctness and core contracts.
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformanceCPU, SIMD, BLAS, GPU, parallelism, and benchmarks.priority lowLater capabilities after correctness and core contracts.trackingBroad feature area with an explicit implementation checklist.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions