accelerate-llvm-ptx: Accelerate backend generating LLVM
This library implements a backend for the Accelerate language which generates LLVM-IR targeting CUDA capable GPUs. For further information, refer to the main accelerate package.
- Dependencies
Haskell dependencies are available from Hackage. The following external libraries are alse required:
- 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. 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
Flags
Automatic Flags
Name | Description | Default |
---|---|---|
nvvm | Use the NVVM library to generate optimised PTX | Disabled |
debug | Enable debug tracing message flags. Note that | Disabled |
bounds-checks | Enable bounds checking | Enabled |
unsafe-checks | Enable bounds checking in unsafe operations | Disabled |
internal-checks | Enable internal consistency checks | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- accelerate-llvm-ptx-1.0.0.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 1.0.0.0, 1.0.0.1, 1.1.0.0, 1.1.0.1, 1.2.0.0, 1.2.0.1, 1.3.0.0 |
---|---|
Dependencies | accelerate (>=1.0 && <1.1), accelerate-llvm (>=1.0 && <1.1), base (>=4.7 && <4.10), bytestring (>=0.9), containers (>=0.5 && <0.6), cuda (>=0.7), directory (>=1.0), dlist (>=0.6), fclabels (>=2.0), filepath (>=1.0), hashable (>=1.2), llvm-hs (>=4.0 && <4.1), llvm-hs-pure (>=4.0 && <4.1), mtl (>=2.2.1), nvvm (>=0.7.5), pretty (>=1.1), time (>=1.4), unordered-containers (>=0.2) [details] |
Tested with | ghc >=7.8 && <7.9 |
License | BSD-3-Clause |
Author | Trevor L. McDonell |
Maintainer | Trevor L. McDonell <tmcdonell@cse.unsw.edu.au> |
Revised | Revision 2 made by TrevorMcDonell at 2017-05-18T01:09:57Z |
Category | Compilers/Interpreters, Concurrency, Data, Parallelism |
Bug tracker | https://github.com/AccelerateHS/accelerate/issues |
Source repo | head: git clone https://github.com/AccelerateHS/accelerate-llvm.git this: git clone https://github.com/AccelerateHS/accelerate-llvm.git(tag 1.0.0.0) |
Uploaded | by TrevorMcDonell at 2017-03-31T09:02:30Z |
Distributions | |
Reverse Dependencies | 5 direct, 2 indirect [details] |
Downloads | 6264 total (10 in the last 30 days) |
Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |