An Interface for Embedding the BLAS in Haskell
Loading...
Date
2020-12-08
Authors
Ndemeye, Bosco
Journal Title
Journal ISSN
Volume Title
Publisher
University of Oregon
Abstract
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.
Description
Keywords
blas, domain specific languages, functional programming, indexed types, linear algebra