3维线程格 gpu_我的GPU上的线程,块和网格总数。

对于NVIDIA GEFORCE 940mx GPU,Device Query显示它有3个多处理器,每个MP有128个核心,每个多处理器2048个线程,总计6144个线程。然而,视频中提到GPU对线程数没有限制,但对块的数量有上限。这导致了混淆。实际上,最大并发线程和块与可为特定内核启动的线程和块的限制是两个不同的概念。最大线程数是6144,每个块1024个线程,最大维度大小为(1024, 1024, 64),而网格尺寸为(2147483647, 65535, 65535)。实际的内核启动参数和块尺寸需要根据需求进行调整。" 7465137,1169489,EditTextPreference光标位置调整,"['Android开发', 'UI交互', 'EditText']
摘要由CSDN通过智能技术生成

For the NVIDIA GEFORCE 940mx GPU, Device Query shows it has 3 Multiprocessor and 128 cores for each MP.

Number of threads per multiprocessor=2048

So, 3*2048=6144.ie. total 6144 threads in GPU.

6144/1024=6 ,ie. total 6 blocks. And warp size is 32.

But from this video https://www.youtube.com/watch?v=kzXjRFL-gjo i found that each GPU has limit on threads, but no limit on Number of blocks.

So i got confused with this. I would like to know

How many total threads are in my GPU? Can we use all threads for

execute a program?

How many blocks and Grids are there?

解决方案

It appears the main source of your confusion is mixing up two completely different sets of limits:

The maximum number of threads and blocks which can run concurrently on the GPU.

The maximum number of threads and blocks which can be launched for a given kernel.

The numbers you quote (2048 threads per multiprocessor, three multiprocessors in total = 6144 threads represent the first set of limits. The numbers you show in your screenshot of the deviceQuery output:

Maximum number of threads per multiprocessor: 2048

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): (2147483647, 65535, 65535)

define the limits of a given kernel launch. While they overlap somewhat, you can treat them as more or less separate. For a more thorough discussion of the practicalities of kernel launch parameters and block dimensions, see here.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值