Monday, March 21, 2011

'fxc.exe' is not recognized as an internal or external command,

If you get error like "'fxc.exe' is not recognized as an internal or external command," when compiling CUDA sample, it is because the DirectX utilities is not found in your PATH, set it and rebuild the project.

Remember to install DirectX SDK before.

You might also need to setup include and library folder point to DirectX SDK folder.

Thursday, March 3, 2011

Install CUDA display driver on U45J series

For my Geforce 310M graphics card, when I do install the CUDA official driver, it told me that the driver is not supported. Here is how to update it.

1) Download CUDA driver file from Nvidia webpage http://www.nvidia.com
2) From the Start Menu in Windows, go to run and type dxdiag. Once the window appears, on bottom right hand side there is an option to "Save All Information". Save this information on your Desktop. It will save a .txt file to your desktop.
3) Within this text, file search for the section "NVIDIA GeForce 310M". You only need to use a certain piece of the Device and Subsystem ID such as " PCI\VEN_10DE&DEV_0A70&SUBSYS_12D21043&REV_A2\4&179FD7D4&0&0008" from my base U45J laptop. This will be important in the next step.
4) Now you will need a tool like WinRar or WinZip to extract the files from the Nvidia driver executable. Once you have WinRar or similar installed, you can right on the Nvidia driver executable and choose extract.
5) Within the file folder extracted from the Nvidia driver executable, you will need to open the file nvam.inf, choose find and enter the "0A70.02". There are two instances to find. Once you have found the first, towards the end of the line you should see the text "PCI\VEN_10DE&", highlight all the text following this and paste the Device and Subsystem ID found earlier in Step 3. You should end up with something like “%NVIDIA_DEV.0A70.02% = Section077, PCI\VEN_10DE&DEV_0A70&SUBSYS_12D21043 ".
Make sure to do this for both instances.
6) Now you must uninstall the nvidia display driver from the control panel. Make sure to only uninstall the display driver as that is all you are updating.
7) Now you can reboot. Once your computer has restarted, within the file folder extracted from the Nvidia driver executable, you can simply double click the setup.exe, and your new driver will install.


Tips: Download the original NVIDIA driver from manufacture and then find the corresponding .inf file so that you will know which file to modify, in my case is from ASUS and they update the nvam.inf file, inside that file you'll also find the correct update inf for your driver, just copy & paste it into the official NVIDIA inf file.


My profile :)
c:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\bin\win32\Debu
\deviceQuery.exe Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

There is 1 device supporting CUDA

Device 0: "GeForce 310M"
  CUDA Driver Version:                           3.20
  CUDA Runtime Version:                          3.20
  CUDA Capability Major/Minor version number:    1.2
  Total amount of global memory:                 1034551296 bytes
  Multiprocessors x Cores/MP = Cores:            2 (MP) x 8 (Cores/MP) = 16 (Co
es)
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       16384 bytes
  Total number of registers available per block: 16384
  Warp size:                                     32
  Maximum number of threads per block:           512
  Maximum sizes of each dimension of a block:    512 x 512 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 1
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             256 bytes
  Clock rate:                                    1.47 GHz
  Concurrent copy and execution:                 Yes
  Run time limit on kernels:                     Yes
  Integrated:                                    No
  Support host page-locked memory mapping:       Yes
  Compute mode:                                  Default (multiple host threads
can use this device simultaneously)
  Concurrent kernel execution:                   No
  Device has ECC support enabled:                No
  Device is using TCC driver mode:               No

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 3.20, CUDA Runtime Ver
ion = 3.20, NumDevs = 1, Device = GeForce 310M


PASSED

Press <Enter> to Quit...
-----------------------------------------------------------