The latest version of accelerate-llvm is 1.3.0.0-0.

accelerate-llvm

Version 1.0.0.0 revision 5 uploaded by TrevorMcDonell.

Package meta

Synopsis
Accelerate backend generating LLVM
Description

This library implements direct LLVM IR generation for the Accelerate language. For further information, refer to the main accelerate package.

Dependencies

Haskell dependencies are available from Hackage. The following external libraries are alse required:

  • LLVM

  • libFFI (if using accelerate-llvm-native)

  • CUDA (if using accelerate-llvm-ptx)

Installing LLVM

Homebrew

Example using Homebrew on macOS:

brew install llvm-hs/homebrew-llvm/llvm-4.0

Debian & Ubuntu

For Debian/Ubuntu based Linux distributions, the LLVM.org website provides binary distribution packages. Check apt.llvm.org for instructions for adding the correct package database for your OS version, and then:

apt-get install llvm-4.0-dev

Building from source

If your OS does not have an appropriate LLVM distribution available, you can also build from source. Detailed build instructions are available on LLVM.org. Make sure to include the cmake build options -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON so that the libLLVM shared library will be built.

If using the accelerate-llvm-ptx backend, also ensure that the LLVM_TARGETS_TO_BUILD option includes the NVPTX target (if not specified, all targets are built).

Installing accelerate-llvm

To use accelerate-llvm it is important that the llvm-hs package is installed against the libLLVM shared library, rather than statically linked, so that we can use LLVM from GHCi and Template Haskell. This is the default configuration, but you can also enforce this explicitly by adding the following to your stack.yaml file:

flags:
  llvm-hs:
    shared-llvm: true

Or by specifying the shared-llvm flag to cabal:

cabal install llvm-hs -fshared-llvm
Author
Trevor L. McDonell
Bug reports
https://github.com/AccelerateHS/accelerate/issues
Category
Compilers/Interpreters, Concurrency, Data, Parallelism
Copyright
n/a
Homepage
n/a
Maintainer
Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>
Package URL
n/a
Stability
n/a

Components