Examples programs using Accelerate
Example programs using the Accelerate library. If you add new features to the base library or find a bug, please add a test case. The aim is for this program to evolve and be useful for both performance and regression testing.
If you have found a bug, please report it to: https://github.com/AccelerateHS/accelerate/issues
accelerate-examples and its dependencies requires several
external packages. You may need to adjust the package names or versions slightly
for your system.
Mac OS (homebrew)
If you want to use the CUDA GPU enabled backends
will also need to install the CUDA toolkit for your system. You can find an
installer on NVIDIA's website here:
The recommend installation method is via
example, to build using ghc-7.10:
ln -s stack-7.10.yaml stack.yaml # only once stack setup --upgrade-cabal # only once, if using CUDA stack install # or, 'stack build' to not install the executables globally
Before building, you may want to edit the
stack.yaml file to change the build
configuration. In particular, the
flags section at the bottom can be used to
enable or disable individual example programs and accelerate backends, as well
as features such as monitoring and debug output.
Installing the development version via
cabal is not recommended. However, if
you must, here are some tips:
llvm-generalmust be installed with flag
- The development versions tend to depend on other development versions which will not be available on Hackage yet, so you will need to manually download those from github and add/build those yourself.
Adding new backends
Adding support for new Accelerate backends should require only a few minor additions to the cabal file and the file 'lib/ParseArgs.hs'. See that file for instructions, and/or follow the example of the CUDA backend (grep 'ACCELERATE_CUDA_BACKEND').