The nvcc.profile in /CUDA/bin64 incorrectly adds $(TOP)/bin to $PATH, which means 64-bit nvcc ends up calling the 32-bit cudafe in /CUDA/bin/cudafe. In my case at least this causes cudafe to fail with an internal assertion error:
Internal error: assertion failed at: “D:/Bld/rel/gpgpu/toolkit/r2.3/compiler/edg/EDG_3.9/src/c_gen_be.c”, line 3398
1 catastrophic error detected in the compilation of “converter-kernels.cpp1.ii”.
Compilation aborted.
If I fix nvcc.profile to use $TOP/bin64 it all works OK (or if I remove the 32-bit cudafe.exe, then it finds the 64-bit one in the inherited $PATH). Of course I would rather not have to patch all my installs of the CUDA toolkit; is there an official fix for this, or is there a hidden nvcc option to use a different .profile file?
You are correct: this is a bug in nvcc.profile. Someone reported it a few weeks ago, but unfortunately it was already too late to make it in to the CUDA 3.0 Toolkit.
Your change is essentially fine. Alternatively, if you add c:\cuda\bin64 to your system PATH environment variable, it should work even without changing nvcc.profile.