Same problem here. Using a GTX 460M (driver version 270.61), Windows 7 x64.
Everything was running fine with CUDA Toolkit 4.0 RC2 and VS2008. After installing CUDA Toolkit 4.0 final and rebuilding the project, a simple program like:
int main(int argc, char* argv[])
{
int deviceCount;
cudaError_t err = cudaGetDeviceCount(&deviceCount);
}
fails with err == cudaErrorInitializationError
All GPU Computing SDK CUDA samples trigger the same issue since final version (4.0 RC2 samples were OK). DirectCompute and OpenCL samples are not affected by the issue.
What happens if you run deviceQueryDrv? If that doesn’t work either, then it’s a driver issue; if it does, then it’s a runtime issue (which is somewhat easier to solve).
Also, there are new beta drivers out (275-series)…have you tried them at all?
I also had a problem with CUDA 4.0 (+driver 270.51), but now the problem is resolved.
New driver:270.81 is released, and after installing this, everything is working fine.
You can download it from official CUDA download page.