Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 703
MaiaVictor Avatar asked Nov 09 '22 20:11

MaiaVictor


1 Answers

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).

like image 179
Ian Ross Avatar answered Nov 16 '22 22:11

Ian Ross