Optimization options in CUDA

Hi all:

Does any body know what optimizations one can do with -O level with in cuda? Can we switch on or off these optimization options?



In theory you can pass optimisation options to ptxas like:
where # stands for a number {0 … 4}. However I didn’t notice any difference. On the other hand, you can also pass optimisation parameter into nvopencc and that has an impact on the final code.
Be careful with that however, after disabling optimisation on this level compiler was impared in detecting when a pointer points to shared memory instead of global one and resulted in incorrect code!