[Haskell-cafe] Trouble installing example code for Parallel and Concurrent Programming in Haskell

Henning Thielemann lemming at henning-thielemann.de
Sun Nov 12 10:07:26 UTC 2023


On Sat, 11 Nov 2023, David Banas wrote:

> So, is the `accelerate` package still the preferred approach to access a 
> GPU from within a Haskell program, or has it been superseded by 
> something else?

There is an active Google Group for accelerate:
   https://groups.google.com/g/accelerate-haskell


Btw. I have implemented alternatives to 'repa' and 'accelerate':
   https://hackage.haskell.org/package/comfort-array
   https://hackage.haskell.org/package/knead

The 'knead' package requires more manual planning of what to do on 
materialized arrays and what to do on-the-fly, compared to 'accelerate'. 
It does no GPU and no automatic parallelization. It simply translates to 
LLVM and relies on its vectorization. For readily vectorized arithmetic on 
the CPU you can use comfort-blas, which is a high-level binding to BLAS.

My experience with GPU programming is that the speedup is by far less than 
claimed in advertisings and conference talks. Fantastic speedups of 
factors 100 or 1000 are usually due to a comparison of a GPU 
implementation optimized over months to a specific GPU and a CPU version 
quickly implemented in one day, often ignoring vectorization and cache 
optimization. GPU programs are hardly portable between vendors or even 
different GPU generations of the same vendor.


More information about the Haskell-Cafe mailing list