GeForce GTX 560Ti中的线程数

时间:2013-09-17 08:13:23

标签: cuda gpu pycuda

我运行了deviceQuery并获得了以下结果

./deviceQuery Starting... 

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

 Detected 1 CUDA Capable device(s)
 Device 0: "GeForce GTX 560 Ti"
 CUDA Driver Version / Runtime Version          5.0 / 5.0
 CUDA Capability Major/Minor version number:    2.1
 Total amount of global memory:                 1024 MBytes (1073283072 bytes)
 (8) Multiprocessors x ( 48) CUDA Cores/MP:    384 CUDA Cores
 GPU Clock rate:                                1701 MHz (1.70 GHz)
 Memory Clock rate:                             2052 Mhz
 Memory Bus Width:                              256-bit
 L2 Cache Size:                                 524288 bytes
 Max Texture Dimension Size (x,y,z)             1D=(65536), 2D=(65536,65535), 3D= (2048,2048,2048)    
 Max Layered Texture Size (dim) x layers        1D=(16384) x 2048, 2D=(16384,16384) x 2048
 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
 Maximum sizes of each dimension of a block:    1024 x 1024 x 64
 Maximum sizes of each dimension of a grid:     65535 x 65535 x 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
 Device supports Unified Addressing (UVA):      Yes
 Device PCI Bus ID / PCI location ID:           1 / 0
 Compute Mode:
 < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously)  >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 5.0, CUDA Runtime Version = 5.0, NumDevs = 1, Device0 = GeForce GTX 560 Ti      

我的理解是我可以创建最大65535 x 65535 x 65535块,每块1024个线程。我可以拥有65535 x 65535 x 65535 x 1024最大线程吗?如果不是我可以拥有的最大线程数是多少?

任何人都可以澄清这个疑问吗?

2 个答案:

答案 0 :(得分:2)

您的理解是正确的。您可以从理论上启动65535 x 65535 x 65535 x 1024个线程,但由于资源限制,您可能无法达到最大值。

答案 1 :(得分:0)

不幸的是,您不能仅将所有最大网格尺寸相乘,并假设您可以拥有那么多线程。每个MP = 1536有8个MP和最大线程数,因此最多可以生成8 * 1536 = 12288个线程。