I implemented a RNS Montgomery exponentiation in CUDA and on CPU for comparison.
Everything nice everything fine. It runs on just one SM. However, I am going to tell you some strange regression in both CPU/GPU performances.
During the developing, about two months ago, I was using CUDA 5 preview on Ubuntu 11.04 64bit. In this time, I reach the following performances:
CPU 460ms GPU 120ms
Then one day, when I turn on the PC, the graphical environment didn't start. I don't know which was the problem, however I switched to the console and installed again the CUDA driver. At the following boot performances changed:
CPU 310ms GPU 80ms
I was wondering how that could be possible.
However, I went then in holiday for 10 days and I continued developing and optimizing on my notebook (but not the same part of the code, some additional stuff).
When I was back, I just updated the source files, and performances came back to 460/120ms. I couldn't believe it, I tried to install CUDA 5 RC, updating the video driver too. Nothing changed. I checked Debug/Release, CUDA computability, but the problem seems being somewhere else.
Looking around the net I found this, I am pretty sure it must have something to do with the driver, because the performance change affected both CPU and GPU
Do you have some tips/ideas/suggestions?