# CUDA WARPS Conceptual question regarding warps

**URL:** <https://forums.developer.nvidia.com/t/cuda-warps-conceptual-question-regarding-warps/3891>\
**Category:** CUDA Programming and Performance\
**Created:** [May 30, 2008, 1:41am UTC](https://forums.developer.nvidia.com/t/cuda-warps-conceptual-question-regarding-warps/3891 "2008-05-30T01:41:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartik14](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kartik14/32/12064_2.png) [@kartik14](https://forums.developer.nvidia.com/u/kartik14)\
**Post date:** [May 30, 2008, 1:41am UTC](https://forums.developer.nvidia.com/t/cuda-warps-conceptual-question-regarding-warps/3891/1 "2008-05-30T01:41:08Z")

</div>

Hi,

I have a question regarding warps in CUDA.

My understanding is that, the GPU device has many multiprocessors (say N) and each multiprocessor has several processors (say M).

So, if we load a kernal on to the device, it is executed as a grid of thread blocks. These blocks are sheduled for execution on the multiprocessors.

The active blocks are then split into groups of threads called warps which are executed simultaneously.

Since the maximum number of processors on a single multiprocessor is M, shouldn’t the warp size always be M?

Can anyone please clarify this?  
Thanks…  
:blink:

---

<div class="post-metadata">

**Author:** ![vvolkov](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vvolkov](https://forums.developer.nvidia.com/u/vvolkov)\
**Post date:** [May 30, 2008, 3:03am UTC](https://forums.developer.nvidia.com/t/cuda-warps-conceptual-question-regarding-warps/3891/2 "2008-05-30T03:03:32Z")

</div>

> [@](#):
>
> Since the maximum number of processors on a single multiprocessor is M, shouldn’t the warp size always be M?

No, it should be a multiple of M. Think of it as M-lane vector processor with vector length equal to warp size.

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kartik14/32/12064_2.png) [@kartik14](https://forums.developer.nvidia.com/u/kartik14)\
**Post date:** [May 30, 2008, 3:22am UTC](https://forums.developer.nvidia.com/t/cuda-warps-conceptual-question-regarding-warps/3891/3 "2008-05-30T03:22:23Z")

</div>

> [@](#):
>
> No, it should be a multiple of M. Think of it as M-lane vector processor with vector length equal to warp size.
> 
> [snapback]385768[/snapback]

I was just browsing the CUDA Programming guide (Appendix A)

and it was metioned that the warp size is 32 threads…

So, if the warp size is ‘fixed’ at 32 threads, does it mean that the number of processors in each multiprocessor (M) is a factor of 32…??

Does this mean that the value of M is restricted ?

Thanks…

---

<div class="post-metadata">

**Author:** ![seibert](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/seibert/32/520688_2.png) [@seibert](https://forums.developer.nvidia.com/u/seibert)\
**Post date:** [May 30, 2008, 3:53am UTC](https://forums.developer.nvidia.com/t/cuda-warps-conceptual-question-regarding-warps/3891/4 "2008-05-30T03:53:03Z")

</div>

Yes, the number of multiprocessors is 8 in all current CUDA cards. The warp size is also fixed for all current cards at 32, although you query the warp size at runtime. Future devices may have different values.

---

<div class="post-metadata">

**Author:** ![FullyArticulate](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@FullyArticulate](https://forums.developer.nvidia.com/u/FullyArticulate)\
**Post date:** [May 30, 2008, 6:44am UTC](https://forums.developer.nvidia.com/t/cuda-warps-conceptual-question-regarding-warps/3891/5 "2008-05-30T06:44:24Z")

</div>

> [@](#):
>
> Yes, the number of multiprocessors is 8 in all current CUDA cards.&nbsp; The warp size is also fixed for all current cards at 32, although you query the warp size at runtime.&nbsp; Future devices may have different values.
> 
> [snapback]385795[/snapback]

8 cores per multiprocessor, you mean. One of my cards has 12 multiprocessors, another 16.

---

<div class="post-metadata">

**Author:** ![JHHPC](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@JHHPC](https://forums.developer.nvidia.com/u/JHHPC)\
**Post date:** [May 30, 2008, 7:29am UTC](https://forums.developer.nvidia.com/t/cuda-warps-conceptual-question-regarding-warps/3891/6 "2008-05-30T07:29:46Z")

</div>

> [@](#):
>
> I was just browsing the CUDA Programming guide (Appendix A)
> 
> and it was metioned that the warp size is 32 threads…
> 
> So, if the warp size is ‘fixed’ at 32 threads, does it mean that the number of processors in each multiprocessor (M) is a factor of 32…??
> 
> [snapback]385780[/snapback]

Said before but just as starter:

Each GPU has multiprocessors ranging to 16 at the top models. Each mp now has 8 SIMD processors.

The warps size of 32 is easy explained if you go into detail of the instruction set.

The most common instructions take 4 clock cylces. As each warp can issue 8 threads at a time (remember the 8 SIMD processors), it takes 4 steps to issue all threads. At this point the pipeline is finished for the first 8 threads.

You can ensure scaling by splitting up your problem to as many blocks as possible. As long as you do this and keep at least 64 threads per block (== 2 warps), your algorithm should be independent of the amount of multiprocessors

In my opinion the number of SIMD procs per MP will not increase too much, as SIMD constraints then become a problem for scientific computing.

Johannes

---

<div class="post-metadata">

**Author:** ![seibert](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/seibert/32/520688_2.png) [@seibert](https://forums.developer.nvidia.com/u/seibert)\
**Post date:** [May 30, 2008, 12:02pm UTC](https://forums.developer.nvidia.com/t/cuda-warps-conceptual-question-regarding-warps/3891/7 "2008-05-30T12:02:13Z")

</div>

> [@](#):
>
> Yes, the number of multiprocessors is 8 in all current CUDA cards.Â&nbsp; The warp size is also fixed for all current cards at 32, although you query the warp size at runtime.Â&nbsp; Future devices may have different values.
> 
> [snapback]385795[/snapback]

Ah, nuts. Yeah, I mean 8 processors per multiprocessor. Sorry to add to the confusion.
