How to read .cu files ( that accelerate generates.

Takayuki Muranushi muranushi at
Tue Dec 14 11:12:23 EST 2010

2010/12/13 Manuel M T Chakravarty <mchakravarty at>:
> Takayuki Muranushi:
>> Nice to meet you, let me make a first question.
>> Today, I succeeded in installing Accelerate in GPU machine and running
>> examples. This project is very interesting!
>> To begin with, I'm going to write my samples and see how they work. As
>> doing so, it'll be helpful if I could see what kind of codes are being
>> generated and how they change as I change the Haskell programs. At the
>> moment, I guess Accelerate is removing .cu files it generates because
>> I can't find them.
>> So, is there an easy way to make Accelerate keep the files? Or, shall
>> I modify Compile.hs or something, to do that?
> Which version of Accelerate are you using?  You might want to have a look at accelerate.cabal (in the toplevel directory).  There are various options that you can pass during the configure step (when compiling the library).  On of the more recent options is 'pcache'.  If you pass the option '-fpcache' to configure, Accelerate will keep the generated kernels in a subdirectory called "cache".
> We have also got a paper describing code generation in some detail:
> I hope that helps.
> Cheers,
> Manuel

Dear Manuel,

Thank you for your response. I'm using (took it from the darcs
Now I looked at the .cabal and found the option, that resolves my
problem. Thankyou!
First of all I had hard time figuring out how to have Accelerate
generate CUDA codes...
until I found "cuda" flag in .cabal . It'll be helpful for people like
me if you include some
mentions about the options in README in the future.

Also I found out that by default, the generated file are put under /tmp .

I'll read the paper. Thank you for introduction!

The Hakubi Center, Kyoto University

More information about the Accelerate mailing list