The recommend way to build and install the development version of Accelerate is to use the stack
build tool. This will automatically pull in other in-development Accelerate packages from GitHub, as well as dependencies from Hackage. stack
can also be used to download and install an appropriate version of GHC. Instructions and downloads for installing stack
are available for several operating systems and distributions on the haskellstack.org website.
Note that you will still need to install necessary external libraries, such as LLVM, as described on the getting started page.
For example, to build the development version of the LLVM backends:
Download the sources for accelerate-llvm
:
git clone https://github.com/AccelerateHS/accelerate-llvm.git
We maintain stack configurations for several GHC releases. Change directory to the newly downloaded sources and tell stack
which version of GHC you would like to compile for by creating a symlink to the appropriate file named stack.yaml
. For example, to use GHC-8.0:
cd accelerate-llvm
ln -s stack-8.0.yaml stack.yaml
If you wish to make any changes to the build configuration, now is a good time to open the stack.yaml
file in a text editor and make the necessary changes. For example:
If you do not have a CUDA capable GPU, you will not be able to build the accelerate-llvm-ptx
package, in which case it is worthwhile commenting that out from the packages:
stanza.
You can enable (or disable) building the Accelerate packages with extra debugging information by changing the flags:
stanza at the bottom of the file.
Allow stack to fetch any prerequisites, including an appropriate version of GHC if necessary:
stack setup
Build the LLVM backends:
stack build
If you want to load the sources into ghci
, use the command stack exec ghci
.
Core packages:
Libraries:
Deprecated:
stack
configurations pointing to the most recent development versions of all packages we maintain is available here. Its purpose is mostly to ensure that all packages build together successfully, which you can check via the travis build log.