【发布时间】:2015-06-30 10:28:26
【问题描述】:
下面是我的gpu信息:
Device 0: "GeForce GT 440"
CUDA Driver Version / Runtime Version 7.0 / 7.0
CUDA Capability Major/Minor version number: 2.1
Total amount of global memory: 1536 MBytes (1610612736 bytes)
( 3) Multiprocessors, ( 48) CUDA Cores/MP: 144 CUDA Cores
GPU Max Clock rate: 1189 MHz (1.19 GHz)
Memory Clock rate: 800 Mhz
Memory Bus Width: 192-bit
L2 Cache Size: 393216 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65535),
3D=(2048, 2048, 2048)
Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 32768
Warp size: 32
Maximum number of threads per multiprocessor: 1536
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (65535, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
CUDA Device Driver Mode (TCC or WDDM): WDDM (Windows Display Driver Mo
del)
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0
Compute Mode:
cuda 代码很简单:
__global__ void kernel(float *d_data)
{
*d_data = -1;
*d_data = 1/(*d_data);
*d_data = (*d_data) / (*d_data);
}
int main()
{
float *d_data;
cudaMalloc(&d_data, sizeof(float));
while (1)
kernel << <1, 1 >> >(d_data);
float data;
cudaMemcpy(&data, d_data, sizeof(int), cudaMemcpyDeviceToHost);
printf("%f\n",data);
return 0;
}
然后运行代码,我得到 GPU-Z 的 gpu 负载为 99%!!
GPU-Z:http://www.techpowerup.com/gpuz/
我错过了什么吗?如何理解gpu负载?
【问题讨论】: