I have a GTX Titan Z graphics card. It has twin GPUs with total memory of 12 GB (6GB + 6GB). When I use DeviceQuery application in Cuda Sample (V6.5) folder to see the specification, it shows two devices, each having total memory of 4 GB. Furthermore, in my C++ code I can only access to 4GB memory. On the other hand, when I run GPU-Z software, it shows two Titan Zs, each having 6GB memory. Could anyone explain what has caused this problem and how can be resolved?
3
votes
What OS are you running? 32/64 bit?
- Jez
Are you using an "express" version of Visual Studio to compile the apps? If so, the express versions only have support for creating 32-bit executables (both host and device code) and therefore you will run into the 4GB limitation.
- Robert Crovella
I am using Visual Studio 2010 professional version. Considering your comment, I changed the configuration for the platform type to 64, and the problem was resolved. Many thanks for your help!
- user3692886
@Jez you pointed out the 32/64 bit issue. If you want to provide an answer I would upvote it.
- Robert Crovella
1 Answers
5
votes
The problem here was that the program was being compiled as a 32-bit application. With 32 bits the program is only able to address 4GB of memory. The CUDA call to check device specifications (cudaGetDeviceProperties) appears to recognize this fact, and only reports the 4GB you can actually use.
Compiling as a 64-bit application should resolve this problem.