How do I enable CUDA on the examples on the accelerate-examples package?

212 Views Asked by At

I've installed CUDA on my OSX Yosemite. I've downloaded the accelerate-examples package and compiled it with cabal install. It compiled correctly. When I ran the examples, though, I noticed they do not offer a option to run under CUDA. For example:

vh:accelerate-crystal apple1$ ./accelerate-crystal
EKG monitor started at: http://localhost:8000

accelerate-crystal (c) [2011..2013] The Accelerate Team

Usage: accelerate-crystal [OPTIONS]

Available backends:
  *  interpreter  reference implementation (sequential)

This makes them run slow (and, obviously, beat the purpose). How do I enable CUDA on the compiled examples?

1

There are 1 best solutions below

0
On

I think you just need to use the -fcuda flag when you Cabal install. This will install the acclerate-cuda package and enable the CUDA backend for all the examples (they seem to use the CUDA backend by default if it's enabled).