Changes

Jump to: navigation, search

GPU

286 bytes added, 20:28, 9 August 2019
Grids and NDRange
== Grids and NDRange ==
CUDA While warps, blocks, wavefronts and workgroups are concepts that the machine executes... Grids and OpenCL NDRange is NDRanges are the end scope of scaling for the programming modelproblem specified by a programmer. Many blocks can be specified in For example, a pixel-shader executing over a 1920x1080 screen will have 2,073,600 pixels to process. GPUs are designed such that each of these pixels could get its own thread of execution. Specifying these 2,073,600 work items is the purpose of a CUDA Grid, while many workgroups operate over an or OpenCL NDRange.
The underlying hardware supports running many workgroups in GPUs "only" have support for tens-of-thousands of threads of parallel, across different compute unitsexecution. An AMD Vega64 has 64 compute units for exampleIn practice, while an NVidia RTX 2070 has 40 symmetric multiprocessorsthe device driver will cut up a Grid or NDRange (usually consisting of millions of items) into Blocks or Workgroups. The hardware scheduler can fit many These blocks and workgroups per compute unit. The exact number is dependent on the amount of registers, memory, and wavefronts a particular workgroup useswill execute in parallel.
CUDA Grids and OpenCL NDRanges may operate in parallelcan be 1-dimensional, 2-dimensional, or 3-dimensional. 2-dimensional grids are common for screen-space operation such as pixel shaders. While 3-dimensional grids are useful for specifying many operations per pixel (such as a raytracer, which may be traversed sequentially if the GPU doesn't have enough parallel resourceslaunch 5000 rays per pixel).
= Architectures and Physical Hardware =

Navigation menu