正在加载图片...
G) Divergence Main performance concern with branching is divergence Threads within a single warp take different paths Different execution paths are serialized in G80 The control paths taken by the threads in a warp are traversed one at a time until there is no more A common case: avoid divergence when branch condition is a function of thread iD Example with divergence °工f( threadx,x>2){} This creates two different control paths for threads in a block Branch granularity warp size: threads 0 and l follow different patl than the rest of the threads in the first warp Example without divergence If (threadIdx. x/ WARP SIZE >2)) Also creates two different control paths for threads in a block Branch granularity is a whole multiple of warp size: all threads in any given warp follow the same pathDivergence 11
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有