IP Library Granted Patent US 12,277,488
Granted Patent B2
US 12,277,488 · App. 17/868,675 · Granted Apr 15, 2025

Buffer addressing for a convolutional neural network

Inventors: Daniel Barnard (Berkhamsted, GB); Clifford Gibson (St. Albans, GB); Colin McQuillan (Watford, GB)
Assignee: Imagination Technologies Limited
G06N3/04G06F12/0207G06F12/0607G06F12/0653G06N3/045G06N3/063G06F2212/1016G06F2212/251
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,277,488
App. No.
17/868,675
Granted
Apr 15, 2025
Kind
B2
Abstract

A method for providing input data for a layer of a convolutional neural network (CNN). Input data is received comprising input data values to be processed in a layer of the CNN. Addresses in banked memory of a buffer are determined in which the received data values are to be stored based upon format data indicating a format parameter of the input data in the layer and indicating a format parameter of a filter which is to be used to process the input data in the layer. The received input data values are stored at the determined addresses in the buffer for retrieval for processing in the layer.

Claims (79)

1. A method of storing input data for a layer of a convolutional neural network (CNN) in a buffer comprising a plurality of banks for processing, the method comprising:

receiving input data comprising input data values to be processed in a layer of the CNN, each input data value has a position in the input data defined by x, y and p coordinates reflecting a column, row and plane of the input data value respectively;

determining addresses in the buffer in which the received input data values are to be stored dependent on a dimension of the input data and a dimension of a filter to be applied to the input data;

keeping a cursor for one or more salient positions to reduce arithmetic performed to determine the addresses in the buffer in which the received input data values are to be stored; and

storing the received input data values at the determined addresses in the buffer for retrieval for processing in the layer.

2. The method of claim 1 , wherein the one or more salient positions comprise one or more of:

a (0,0,0) filter value for a start of a current output row and column;

a (0, y, 0) filter value for the start of the current output row and column;

a (x, y, 0) filter value for the start of the current output row and column; and

a (x, y, p) filter value for the start of the current output row and column.

3. The method of claim 1 , wherein an address for at least one input data value is determined from the cursor and a difference between x, y and p coordinates for the at least one input data value and x, y and p co-ordinates of one of the one or more salient positions respectively.

4. The method of claim 1 , wherein each bank comprises a number of words, and the cursor comprises a two-value array in the form:

cursor( x,y,p )=(RasterAddr( x,y,p ),RAMSEL( x,y,p ))

wherein RasterAddr(x,y,p)=(x*P+p+y*WordsPerLine) % (RAMSIZE*N=),

RAMSEL(x,y,p) indicates a bank of the buffer, WordsPerLine is a value that indicates a number of words of each bank that will be required to store a row of the input data, P is the number of planes in the input data, RAMSIZE is a number of addresses in each bank, and N B is the number of banks.

5. The method of claim 4 , wherein WordsPerLine is equal to:

floor

(

(

P

*

X

+

N

B

-

1

N

B

)

)

*

N

B

wherein X is a number of columns of the input data.

6. The method of claim 4 , wherein each address in the buffer is defined by a first value, RAMSEL, indicating a bank of the buffer, and a second value, MEMADDR, indicating a memory location within the bank.

7. The method of claim 6 , wherein

MEMADDR

(

x

,

y

,

z

)

=

RasterAddr

(

x

,

y

,

p

)

N

B

.

8. The method of claim 4 , wherein determining an address for an input data value comprises determining RasterAddr(x+Δx, y+Δy, p+Δp), wherein:

RasterAddr′=RasterAddr( x,y,p )+Δ x*P+Δp+Δy *WordsPerLine; and

if RasterAddr′ is <RAMSIZE*N B then RasterAddr(x+Δx,y+Δy,p+Δp)=RasterAddr′,

else RasterAddr(x+Δx, y+Δy, p+Δp)=RasterAddr′−RAMSIZE*N B .

9. The method of claim 4 , wherein determining an address for an input data value comprises determining RAMSEL(x+Δx, y+Δy, p+Δp), wherein RAMSEL(x+Δx, y+Δy,p+Δp)=(RAMSEL(x,y,p)+Δy*m*P+Δx*P+Δp) % N B and m is a width of the filer to be applied to the input data.

10. The method of claim 9 , wherein RAMSEL(x,y,p)=(x*P+p+y*m*P) % N B and m is a width of the filter to be applied to the input data.

11. The method of claim 1 , wherein the dimension of the filter to be applied to the input data comprises a width, m, of the filter.

12. The method of claim 1 , wherein the dimension of the filter to be applied to the input data comprises a height, n, of the filter.

13. The method of claim 1 , further comprising reading input data values from the buffer in a plurality of read cycles and passing the read input data values to convolution engines for processing.

14. The method of claim 1 , further comprising receiving the input data from external memory.

15. Hardware logic for implementing a convolutional neural network (CNN), the hardware logic configured to:

receive input data comprising input data values to be processed in a layer of the CNN, each input data value has a position in the input data defined by x, y and p co-ordinates reflecting a column, row and plane of the input data value respectively;

determine addresses in the buffer in which the received input data values are to be stored dependent on a dimension of the input data and a dimension of a filter to be applied to the input data;

keep a cursor a cursor for one or more salient positions to reduce arithmetic performed to determine the addresses in the buffer in which the received input data values are to be stored; and

store the received input data values at the determined addresses in the buffer for retrieval for processing in the layer.

16. The hardware logic of claim 15 , wherein the hardware logic is embodied on an integrated circuit.

17. Hardware logic configured to perform the method as set forth in claim 1 .

18. A non-transitory computer readable storage medium having stored thereon computer readable instructions that, when executed at a computer system, cause the computer system to perform the method as set forth in claim 1 .

19. A method of manufacturing, at an integrated circuit manufacturing system, the hardware logic as set forth in claim 15 , comprising inputting a computer readable dataset description of said hardware logic into the integrated circuit manufacturing system, which processes the computer readable dataset description to manufacture said hardware logic.

20. A non-transitory computer readable storage medium having stored thereon a computer readable dataset description of an integrated circuit that, when processed in an integrated circuit manufacturing system, causes the integrated circuit manufacturing system to manufacture the hardware logic as set forth in claim 15 .

Assignments (1)
SECURITY INTEREST Recorded Jul 31, 2024
From: IMAGINATION TECHNOLOGIES LIMITED
To: FORTRESS INVESTMENT GROUP (UK) LTD
Reel/Frame 068221/0001 →