How to specify optimization level in device code?

Hi all,

I want to compare the performance of cuda code with/without optimization.
But I can’t compile .cu code without optimization.
I tried “nvcc -O0” but it seems to be option for host-code.
How to specify optimization level in device code???

Thanks,
kumazaku

[font=“Courier New”]nvcc -Xopencc -O0[/font] for CUDA 4.0 or earlier. Note that this is not officially supported though, it’s just for your experiments and might generate wrong code.