# US 2011/0238955 A1 · Methods for scalably exploiting parallelism in a parallel processing system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2011/0238955 A1
- Document ID: US20110238955A1
- Status: Published application
- Kind: A1
- Application number: 13/099,035
- Filed: 2011-05-02
- Published: 2011-09-29
- Earliest claimed: 2006-11-01
- Assignees: NVIDIA Corporation
- Inventors: John R. Nickolls; Stephen D. Lew
- Web page: https://patentgrep.com/patent/US20110238955A1

## CPC

- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/30072: {to perform conditional operations, e.g. using predicates or guards}
- G06F 9/3012: {Organisation of register space, e.g. banked or distributed register file}
- G06F 9/3888: {controlled by a single instruction for multiple threads [SIMT] in parallel}
- G06F 9/3889: {controlled by multiple instructions, e.g. MIMD, decoupled access or execute}
- G06F 9/5066: {Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs (mappping at compile time, see G06F8/451)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Parallelism in a parallel processing subsystem is exploited in a scalable manner. A problem to be solved can be hierarchically decomposed into at least two levels of sub-problems. Individual threads of program execution are defined to solve the lowest-level sub-problems. The threads are grouped into one or more thread arrays, each of which solves a higher-level sub-problem. The thread arrays are executable by processing cores, each of which can execute at least one thread array at a time. Thread arrays can be grouped into grids of independent thread arrays, which solve still higher-level sub-problems or an entire problem. Thread arrays within a grid, or entire grids, can be distributed across all of the available processing cores as available in a particular system implementation.

## Claims

### Claim 1

(canceled)

### Claim 2

A method for operating a computer system to generate an array of output data elements using program code that, when executed, generates at least one output data element for the array of output data elements, the method comprising:
defining, by the computer system, based at least in part on an array size parameter for the array of output data elements, a first number (n1) of blocks of output data elements, wherein each block includes a number (ne) of the output data elements;
defining, by the computer system, a thread array corresponding to each block, each thread array including a number (n0) of threads of execution of the program code sufficient to generate each of the ne output data elements in the corresponding block;
distributing, by the computer system, the n1 thread arrays among one or more of a number Ctot of processing cores; and
operating each of the one or more processing cores to execute each of the thread arrays distributed thereto,
wherein executing a thread array includes executing the n0 threads of the program code to generate each of the ne output data elements in the corresponding block and storing the ne output data elements in a memory.

### Claim 3 (depends on 2)

The method of claim 2 further comprising:
selecting the number ne based at least in part on a maximum number of threads that are concurrently executable in one of the one or more processing cores and a number of output data generated by executing a single instance of the program code.

### Claim 4 (depends on 2)

The method of claim 2 further comprising:
selecting the number ne to be at least equal to a minimum number of threads required to keep one of the one or more processing cores fully occupied.

### Claim 5 (depends on 2)

The method of claim 2 wherein the program code generates exactly one of the output data elements.

### Claim 6 (depends on 2)

The method of claim 2 wherein the output data elements correspond to pixels in an image

### Claim 7 (depends on 6)

The method of claim 6 wherein a product n1*ne is equal to a number of pixels in the image.

### Claim 8 (depends on 6)

The method of claim 6 wherein the program code includes code for performing a kernel-based filter on a set of input data elements to produce one of the output data elements.

### Claim 9 (depends on 2)

The method of claim 2 wherein distributing the n1 thread arrays includes sending each of the n1 thread arrays sequentially to a single processing core.

### Claim 10 (depends on 2)

The method of claim 2 wherein distributing the n1 thread arrays is performed such that in the event that n1 is at least equal to Ctot, every processing core of the computer system receives at least one thread array.

### Claim 11 (depends on 2)

The method of claim 2 wherein distributing the n1 thread arrays includes distributing the n1 thread arrays among a number C of parallel cores within a parallel processing unit, wherein the number C is at least two

### Claim 12 (depends on 2)

The method of claim 2 wherein distributing the n1 thread arrays includes:
distributing the n1 thread arrays among a number U of parallel processing units available to the computer system, wherein the number U is at least two; and
within each of the U parallel processing units, further distributing the thread arrays distributed thereto among a number Cj of cores within that parallel processing unit.

### Claim 13

A method for operating a computer system to generate an array of output data elements using program code that, when executed, generates at least one output data element for the array of output data elements, the method comprising:
defining, by the computer system, a number (n2) of grids, each grid including a subset of the output data elements;
defining, by the computer system, within each grid, a number (n1) of blocks, each block including a number (ne) of the plurality of output data elements, the number n1 being determined based at least in part on an array size parameter for the array of output data elements;
defining, by the computer system, a thread array corresponding to each block within each grid, each thread array including a number (n0) of threads of execution of the program code sufficient to generate each of the ne output data elements in the corresponding block;
distributing, by the computer system, the n1 thread arrays for each of the n2 grids across one or more processing cores; and
operating each of the one or more processing cores to execute each of the thread arrays distributed thereto,
wherein executing a thread array includes executing the n0 threads of the program code to generate each of the ne output data elements in the corresponding block and storing the ne output data elements in a memory.

### Claim 14 (depends on 13)

The method of claim 13 wherein the output data elements correspond to pixels in a sequence of images to be produced.

### Claim 15 (depends on 14)

The method of claim 14 wherein the grids are defined such that each grid corresponds to a different image in the sequence of images.

### Claim 16 (depends on 15)

The method of claim 15 wherein a product n1*ne is equal to a number of pixels in one of the images.

### Claim 17 (depends on 13)

The method of claim 13 wherein the output data elements correspond to pixels in an image to be produced and wherein a product n2*n1*ne is equal to a total number of pixels in the image.

### Claim 18 (depends on 13)

The method of claim 13 wherein the program code comprises code for performing a kernel-based filter on a set of input data elements to produce one of the output data elements.
