How to enable CUDA in the examples in the sample acceleration package?

I installed CUDA on my OSX Yosemite. I downloaded the sample acceleration package and compiled it using cabal install . It is correctly composed. However, when I ran the examples, I noticed that they did not offer the ability to run under CUDA. For instance:

 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 work slowly (and obviously surpass the goal). How to enable CUDA on compiled examples?

+5
source share
1 answer

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

+1
source

Source: https://habr.com/ru/post/1211345/


All Articles