开发者

cuda unused threads

say I have 64 threadds in a kernel

__global__ void kernel( ... )
{
    int i = threadIdx.x;
    ... ...
    if (i 开发者_运维百科< 32)
    {
        ... ...
    }
}

basically after a certain point, I won't use threads 32 to 63 any more. What are they gonna do then? Are they gonna still consume processor power, or they are just dead.


They simply will not produce anymore instruction to be issued and executed. Let's say "Dead".


Every thread in a half-warp (or maybe warp depending on your architecture) executes the same instruction at the same time, so all the other threads in the half-warp continue to run, just with their output suppressed. All other half-warps (or maybe warps) are released back to the system as resources.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜