Hi Folks,
for a courseworks I decided to work on GPGPU Computing ith Cuda.
Today I made my really first steps here and encountered a problem.
At least i think it is a problem.
Simple challange was to write a first program being able to read some data from my graphics card,
such as name, cores etc. So far so good. Here’s my code:
[codebox]#include <stdio.h>
#include <cuda_runtime.h>
int main() {
int device = 0;
int gpuDeviceCount = 0;
struct cudaDeviceProp properties;
cudaError_t cudaResultCode = cudaGetDeviceCount(&gpuDeviceCount);
if (cudaResultCode == cudaSuccess)
{
cudaGetDeviceProperties(&properties, device);
printf("%d GPU CUDA devices(s)(%d)\n", gpuDeviceCount, properties.major);
printf("\t Product Name: %s\n" , properties.name);
printf("\t TotalGlobalMem: %d MB\n" , properties.totalGlobalMem/(1024^2));
printf("\t GPU Count: %d\n" , properties.multiProcessorCount);
printf("\t Kernels found: %d\n" , properties.concurrentKernels);
}
return 0; /* success */
}
[/codebox]
I ran this on my workstation (GeForece 8100/nForce 720a all on board) and it returns me:
1 GPU CUDA devices(s)(1)
Product Name: GeForce 8100 / nForce 720a
TotalGlobalMem: 244833 MB
GPU Count: 1
Kernels found: 0
Then I ran this on my HTPC which is based on a Intel Atom N330 with NVidia Ion.
I have CoreAVC with Cuda support runnig there very well, but my code returns:
0 GPU CUDA devices(s)(1638084)
Product Name:
TotalGlobalMem: 0 MB
GPU Count: 2003237514
Kernels found: 4235560
Ok, true, the numbers are totally bulls… here, sure.
My Questions:
-
Why 0 GPUs in the latter sceanrio or why does it not detect anything?
-
How can I query the number of Cuda Cores?
-
I know my code is fragile it was a short test, but beside from this is here something utterly wrong with it?
For my courseworks:
- Does anyone know some good source to get keyfigures about cores in graphics cards over the years? I found some figures on GFlops on Wikipedia.
Cheers,
ruphus