# US 2017/0287103 A1 · Compiler techniques for mapping program code to a high performance, power efficient, programmable image processing hardware platform

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

- Number: US 2017/0287103 A1
- Document ID: US20170287103A1
- Status: Published application
- Kind: A1
- Application number: 15/628,480
- Filed: 2017-06-20
- Published: 2017-10-05
- Earliest claimed: 2016-02-26
- Assignees: Google Inc.
- Applicants: Google Inc.
- Inventors: Albert Meixner; Hyunchul Park; William R. Mark; Daniel Frederic Finchelstein; Ofer Shacham
- Web page: https://patentgrep.com/patent/US20170287103A1

## CPC

- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06F 8/447: {Target code generation}
- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for restructuring an image processing pipeline. The method includes compiling program code targeted for an image processor having programmable stencil processors composed of respective two-dimensional execution lane and shift register circuit structures. The program code is to implement a directed acyclic graph and is composed of multiple kernels that are to execute on respective ones of the stencil processors, wherein the compiling includes performing any of: horizontal fusion of kernels; vertical fusion of kernels; fission of one of the kernels into multiple kernels; spatial partitioning of a kernel into multiple spatially partitioned kernels; or splitting the directed acyclic graph into smaller graphs.

## Claims

### Claim 1

A processor comprising:
a two-dimensional array of processing elements; and
a two-dimensional shift-register array having a first portion of registers that are each dedicated to one of the processing elements in the two-dimensional array of processing elements and having a halo portion of registers that border the first portion of registers on one or more sides of the first portion; and
a sheet generator configured to load sheets of image data into the two-dimensional shift register array, wherein each sheet of image data has at least as many pixels as processing elements in the two-dimensional array of processing elements,
wherein the processor is configured to execute instructions to load input data to perform a stencil function requiring data from multiple sheets of image data, wherein the instructions cause the processor to perform operations comprising:
loading a first sheet of image data into the first portion of the two-dimensional shift-register array,
loading a portion of a second sheet of image data into the halo portion of the two-dimensional shift-register array, and
performing a first iteration of the stencil function using the first sheet of image data loaded into the first portion of the two-dimensional shift-register array and using the portion of the second sheet of image data loaded into the halo portion of the two-dimensional shift-register array.

### Claim 2 (depends on 1)

The processor of claim 1, further comprising local random access memory (RAM) that is local to the processor, and wherein the operations further comprise initially loading the first sheet of image data and the second sheet of image data into the local RAM of the processor, and wherein loading the first sheet of image data into the first portion of the two-dimensional shift-register array comprises loading the first sheet of image data from the local RAM.

### Claim 3 (depends on 2)

The processor of claim 2, wherein loading the portion of a second sheet of image data into the halo portion of the two-dimensional shift-register array comprises loading the portion of the second sheet of image data from the local RAM.

### Claim 4 (depends on 2)

The processor of claim 2, wherein the operations further comprise:
loading the second sheet of image data from the local RAM into the first portion of the two-dimensional shift-register array without reloading the second sheet of image data into the processor;
loading a portion of a third sheet of image data into the halo portion of the two-dimensional shift-register array; and
performing a second iteration of the stencil function using the second sheet of image data loaded into the first portion of the two-dimensional shift-register array and using the portion of the third sheet of image data loaded into the halo portion of the two-dimensional shift-register array.

### Claim 5 (depends on 4)

The processor of claim 4, wherein the operations further comprise:
loading, into the local RAM, the third sheet of image data at least partially concurrently with performing the first iteration of the stencil function.

### Claim 6 (depends on 4)

The processor of claim 4, wherein the operations further comprise:
assigning a first pointer that references a first address of the first sheet of image data loaded into the local RAM;
assigning a second pointer that references a second address of the second sheet of image data loaded into the local RAM; and
updating the first pointer to reference the second address of the second sheet of image data loaded into the local RAM.

### Claim 7 (depends on 6)

The processor of claim 6, wherein loading the second sheet of image data from the local RAM into the first portion of the two-dimensional shift-register array comprises executing a load instruction that references the updated first pointer.

### Claim 8 (depends on 2)

The processor of claim 2, wherein the instructions include an offset instruction that, that when executed by a particular processing element having a particular location in the two-dimensional array of processing elements, causes the processing element to compute, given the particular location, an offset representing a particular sheet of data in the local RAM from which to load data.

### Claim 9 (depends on 1)

The processor of claim 1, wherein the operations further comprise providing an output sheet of data to the sheet generator to be provided by the sheet generator to one or more other components of the processor.

### Claim 10

A computer program product, encoded on one or more non-transitory computer storage media, comprising instructions that when executed by a processor comprising:
(i) a two-dimensional array of processing elements,
(ii) a two-dimensional shift-register array having a first portion of registers that are each dedicated to one of the processing elements in the two-dimensional array of processing elements and having a halo portion of registers that border the first portion of registers on one or more sides of the first portion, and
(iii) a sheet generator configured to load sheets of image data into the two-dimensional shift-register array, wherein each sheet of image data has at least as many pixels as processing elements in the two-dimensional array of processing elements,
cause the processor to load input data to perform a stencil function requiring data from multiple sheets of image data, wherein the instructions cause the processor perform operations comprising:
loading a first sheet of image data into the first portion of the two-dimensional shift-register array,
loading a portion of a second sheet of image data into the halo portion of the two-dimensional shift-register array, and
performing a first iteration of the stencil function using the first sheet of image data loaded into the first portion of the two-dimensional shift-register array and using the portion of the second sheet of image data loaded into the halo portion of the two-dimensional shift-register array.

### Claim 11 (depends on 10)

The computer program product of claim 10, wherein the operations further comprise initially loading the first sheet of image data and the second sheet of image data into local random access memory (RAM) of the processor, and wherein loading the first sheet of image data into the first portion of the two-dimensional shift-register array comprises loading the first sheet of image data from the local RAM.

### Claim 12 (depends on 11)

The computer program product of claim 11, wherein loading the portion of a second sheet of image data into the halo portion of the two-dimensional shift-register array comprises loading the portion of the second sheet of image data from the local RAM.

### Claim 13 (depends on 11)

The computer program product of claim 11, wherein the operations further comprise:
loading the second sheet of image data from the local RAM into the first portion of the two-dimensional shift-register array without reloading the second sheet of image data into the processor;
loading a portion of a third sheet of image data into the halo portion of the two-dimensional shift-register array; and
performing a second iteration of the stencil function using the second sheet of image data loaded into the first portion of the two-dimensional shift-register array and using the portion of the third sheet of image data loaded into the halo portion of the two-dimensional shift-register array.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the operations further comprise:
loading, into the local RAM, the third sheet of image data at least partially concurrently with performing the first iteration of the stencil function.

### Claim 15 (depends on 13)

The processor of claim 13, wherein the operations further comprise:
assigning a first pointer that references a first address of the first sheet of image data loaded into the local RAM;
assigning a second pointer that references a second address of the second sheet of image data loaded into the local RAM; and
updating the first pointer to reference the second address of the second sheet of image data loaded into the local RAM.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein loading the second sheet of image data from the local RAM into the first portion of the two-dimensional shift-register array comprises executing a load instruction that references the updated first pointer.

### Claim 17 (depends on 11)

The computer program product of claim 11, wherein the instructions include an offset instruction that, that when executed by a particular processing element having a particular location in the two-dimensional array of processing elements, causes the processing element to compute, given the particular location, an offset representing a particular sheet of data in the local RAM from which to load data.

### Claim 18 (depends on 1)

The processor of claim 1, wherein the operations further comprise providing an output sheet of data to the sheet generator to be provided by the sheet generator to one or more other components of the processor.

### Claim 19

A method performed by a processor comprising:
(i) a two-dimensional array of processing elements,
(ii) a two-dimensional shift-register array having a first portion of registers that are each dedicated to one of the processing elements in the two-dimensional array of processing elements and having a halo portion of registers that border the first portion of registers on one or more sides of the first portion, and
(iii) a sheet generator configured to load sheets of image data into the two-dimensional shift-register array, wherein each sheet of image data has at least as many pixels as processing elements in the two-dimensional array of processing elements,
wherein the method causes the processor to load input data to perform a stencil function requiring data from multiple sheets of image data, the method comprising:
loading, by the sheet generator, a first sheet of image data into the first portion of the two-dimensional shift-register array,
loading, by the sheet generator, a portion of a second sheet of image data into the halo portion of the two-dimensional shift-register array, and
performing, by the two-dimensional array of processing elements, a first iteration of the stencil function using the first sheet of image data loaded into the first portion of the two-dimensional shift-register array and using the portion of the second sheet of image data loaded into the halo portion of the two-dimensional shift-register array.

### Claim 20 (depends on 19)

The method of claim 19, further comprising initially loading the first sheet of image data and the second sheet of image data into local random access memory (RAM) of the processor, and wherein loading the first sheet of image data into the first portion of the two-dimensional shift-register array comprises loading the first sheet of image data from the local RAM.
