An Interface for Embedding the BLAS in Haskell
Bosco Ndemeye
Committee: Boyana Norris
Masters Thesis(May 2024)
Keywords:

Scientific algorithms have been built on top of linear algebra subprograms, historically implemented in languages such as C/C++ or Fortran, to optimize their performance, sometimes at the cost of their conciseness. Recent work in these languages has sought to address the problem of optimizing the implementations of the subprograms through the use of domain-specific languages (DSLs). However, it has been shown that using various techniques such as fusion, concise yet optimal implementations of array computation DSLs in functional languages — such as Haskell— are possible. Consequently, we investigate an interface to a library that supports subprogram computations in Haskell. We apply the delayed fusion technique to separate data stored in memory and their delayed versions, providing the user with the option to force computation as they deem fit. We present implementations of several subprograms, abstracting over the choice of data sparsity layouts in memory.