I am writing a program that can get and display all information (properties) about GPU device in CUDA 6.5 (C++). But when I run, it does not show the device name as I want and maximum number of threads per block is 1.
I used GPU EN9400GT ASUS.
I am writing a program that can get and display all information (properties) about GPU device in CUDA 6.5 (C++). But when I run, it does not show the device name as I want and maximum number of threads per block is 1.
I used GPU EN9400GT ASUS.
EN9400GT ASUS uses GeForce 9400GT and its compute capability is 1.0. CUDA 6.5 dropped support for cc1.0 so your code won't work. You should use CUDA 6.0 for cc1.0 devices (link).
You could have found out this by yourself if you had used correct error checking code for the CUDA APIs. When checking the return value of a CUDA API, you should compare the return value with cudaSuccess
, not with an arbitrary integer value. If you had compared GPUAvail
with cudaSuccess
like this:
if (GPUAvail != cudaSuccess)
exit(EXIT_FAILURE);
then your program would have stopped. See this article for proper error checking method.
Also, check out deviceQuery
CUDA sample code. This sample code does what you are trying to do.