IP Library › Granted Patent US 12,367,043
Granted Patent B2
US 12,367,043 · App. 16/277,022 · Granted Jul 22, 2025

Multi-threaded barrel processor using shared weight registers in a common weights register file

Inventors: Alan Graham Alexander (Wotton-Under-Edge, GB); Simon Christian Knowles (Corston, GB); Mrudula Chidambar Gore (Bath, GB)
Assignee: Graphcore Limited
G06F9/3013G06F9/3001G06F9/3851G06N3/02
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,367,043
App. No.
16/277,022
Granted
Jul 22, 2025
Kind
B2
Abstract

A processor comprising a barrel-threaded execution unit for executing concurrent threads, and one or more register files comprising a respective set of context registers for each concurrent thread. One of the one or more register files further comprises a set of shared weights registers common to some or all of the concurrent threads. The types of instructions defined in the instruction set of the processor include an arithmetic instruction having operands specifying a source and a destination from amongst a respective set of arithmetic registers of the thread in which the arithmetic instruction is executed. The execution unit is configured so as, in response to the opcode of the arithmetic instruction, to perform an operation comprising multiplying an input from the source by at least one of the weights from at least one of the shared weights registers, and to place a result in the destination.

Claims (47)

1. A processor comprising:

a plurality of register files; and

an execution unit configured to execute instructions of an instruction set;

wherein the execution unit is a barrel-threaded execution unit configured to run a plurality of concurrent threads each in a different respective one of a repeating sequence of interleaved time slots, and for each of the concurrent threads, the plurality of register files comprises a context register file comprising a respective set of context registers arranged to hold a program state of the respective thread, each set of context registers comprising a respective set of arithmetic operand registers for use by the respective thread, wherein each context register file is accessible only by its own respective thread;

wherein the plurality of register files further comprises a common weights register file for which all the concurrent threads have read access, comprising a set of shared weights registers configured to hold weights common to some or all of the concurrent threads, wherein a first one of the concurrent threads and a second one of the concurrent threads both access the shared weights registers and are executed in different time slots in different execution cycles;

wherein the concurrent threads comprise a plurality of worker threads and the execution unit is further arranged to run, at any of the interleaved time slots, a supervisor subprogram comprising at least one supervisor thread configured to manage the worker threads;

wherein the supervisor subprogram is configured to write the weights in the shared weights registers, such that the weights in the shared weights registers can be written only by the supervisor subprogram, and the shared weights registers can be read only by the worker threads;

wherein the instruction set includes an arithmetic instruction having operands specifying a source of an input to be multiplied by at least one weight and a destination, the source and destination specified from amongst the respective set of arithmetic operand registers of the thread in which the arithmetic instruction is executed; and

wherein the execution unit is configured, in response to an opcode of the arithmetic instruction, to perform a multiplication operation comprising multiplying the input from said source by the at least one weight from at least one of the shared weights registers of the common weights register file, and to place a result in said destination.

2. The processor of claim 1 , wherein said at least one of the shared weights registers is implicit from the opcode of the arithmetic instruction, not specified by any operand of the arithmetic instruction.

3. The processor of claim 1 , wherein the arithmetic instruction takes a further operand specifying said at least one of the shared weights registers from amongst the set of shared weights registers.

4. The processor of claim 1 , wherein the input comprises a vector, and the multiplication operation comprises a dot product of the input with a vector of weights from the shared weights registers.

5. The processor of claim 1 , wherein the arithmetic instruction takes a further operand specifying said at least one of the shared weights registers from amongst the set of shared weights registers, and wherein said at least one of the shared weights registers comprises a subset of the shared weights registers from amongst a plurality of subsets, each subset holding a respective weights vector, and wherein said further operand selects from which subset to take the weights vector to use in said multiplication operation.

6. The processor of claim 1 , wherein said arithmetic instruction is selected from a list consisting of: a vector dot product instruction, an accumulating vector dot product instruction, a matrix product instruction, an accumulating matrix product instruction, and a convolution instruction.

7. The processor of claim 1 , wherein the sets of context registers comprise a respective one of the sets of context registers for each of the worker threads that can be executed concurrently, and an additional set of context registers arranged to hold a program state of the supervisor subprogram.

8. The processor of claim 7 , wherein the supervisor subprogram is arranged to begin by initially running in all the slots, and to write the weights before launching the worker threads; and wherein the supervisor subprogram launches each of the worker threads by relinquishing each of some or all of the slots in which the supervisor subprogram is initially running to respective ones of the worker threads.

9. The processor of claim 8 , wherein the instruction set includes a run instruction which, when executed as part of the supervisor subprogram, causes a slot in which the run instruction is executed to be relinquished to a first worker thread such that the first worker thread is launched in that slot in place of the supervisor subprogram.

10. The processor of claim 9 , wherein the instruction set includes an exit instruction which, when executed as part of the first worker thread, causes a slot in which the exit instruction is executed to be handed back to the supervisor subprogram such that the supervisor subprogram continues running in that slot again in place of the first worker thread.

11. The processor of claim 1 , wherein the sets of context registers include a separate arithmetic register file for each concurrent worker thread, the separate arithmetic register file of a given worker thread comprising the respective set of arithmetic operand registers of the given worker thread.

12. The processor of claim 1 , wherein the common weights register file is arranged such that it can be written only by the supervisor subprogram and the worker threads can only read the common weights register file.

13. The processor of claim 1 , wherein the arithmetic instruction is of a type which implicitly defines that the at least one weight is found in the common weights register file.

14. A processor comprising:

a barrel-threaded execution unit configured to run a plurality of concurrent threads each in a different respective one of a repeating sequence of interleaved time slots; and

a common weights register file for which all the concurrent threads have read access, the common weights register file including a set of shared weights registers, wherein a first one of the concurrent threads and a second one of the concurrent threads both access the shared weights registers and are executed in different time slots in different execution cycles;

wherein the concurrent threads comprise a plurality of worker threads and the execution unit is further arranged to run, at any of the interleaved time slots, a supervisor subprogram having at least one supervisor thread configured to manage the worker threads;

wherein the supervisor subprogram is configured to write weights in the shared weights registers, such that the weights in the shared weights registers can be written only by the supervisor subprogram, and the shared weights registers can be read only by the worker threads;

wherein the processor is configured to execute an arithmetic instruction having operands specifying a source of an input to be multiplied by a weight and a destination, the source and the destination specified from among a set of arithmetic operand registers of a first thread of the plurality of concurrent threads in which the arithmetic instruction is executed; and

wherein the execution unit is configured, in response to an opcode of the arithmetic instruction, to perform an operation multiplying the input from the source by a weight from a first one of the shared weights registers and to place a result in the destination.

15. The processor of claim 14 , wherein the first one of the shared weights registers is implicit from the opcode of the arithmetic instruction and is not specified by the operands of the arithmetic instruction.

16. The processor of claim 14 , wherein the arithmetic instruction takes a further operand specifying the first one of the shared weights registers from among the set of shared weights registers.

17. The processor of claim 14 , wherein the input comprises a vector, and the operation comprises a dot product of the input with a vector of weights from the shared weights registers.

18. The processor of claim 14 , wherein the set of shared weights registers comprises a plurality of subsets, each subset holding a respective weights vector; and wherein a further operand selects from which subset to take a weights vector to use in the operation.

19. The processor of claim 14 , wherein the arithmetic instruction comprises an instruction selected from a list consisting of: a vector dot product instruction, an accumulating vector dot product instruction, a matrix product instruction, an accumulating matrix product instruction, and a convolution instruction.

20. A method performed in a processor having a plurality of register files, a first register file of the plurality of register files having a set of shared weights registers, and a barrel-threaded execution unit configured to run a plurality of concurrent threads each in a different respective one of a repeating sequence of interleaved time slots, wherein all the concurrent threads can access the first register file to read from said first register file and wherein the plurality of concurrent threads comprise a plurality of worker threads and the execution unit is further arranged to run, at any of the interleaved time slots, a supervisor subprogram comprising at least one supervisor thread configured to manage the worker threads, the method comprising:

writing a plurality of weights in the set of shared weights registers, by the supervisor subprogram;

supplying a first arithmetic instruction of a first thread of the plurality of worker threads of the plurality of concurrent threads to an execution pipeline in a first timeslot, the first arithmetic instruction having an operand specifying a first source of a first input value to be multiplied by a weight and a first destination, the first source and first destination specified from among a first set of arithmetic registers of the first thread;

accessing the first input value from the first source of the first set of arithmetic registers of the first thread, wherein each thread of the plurality of concurrent threads can only access its own arithmetic registers;

accessing by the first thread of the plurality of worker threads of the plurality of concurrent threads a first weight from a first one of the shared weights registers;

in response to an opcode of the first arithmetic instruction, multiplying the first input value from the first source by the first weight from the first one of the shared weights registers to generate a first result;

placing the first result of the multiplying in the first destination;

supplying a second arithmetic instruction of a second thread of the plurality of worker threads of the plurality of concurrent threads to the execution pipeline in a second timeslot, the second arithmetic instruction having an operand specifying a second source of a second input value to be multiplied by a weight and a second destination, the second source and second destination specified from among a second set of arithmetic operand registers of the second thread, wherein the first timeslot and the second timeslot are in different execution cycles;

accessing the second input value from the second source of the second set of arithmetic registers of the second thread;

accessing by the second thread of the plurality of worker threads of the plurality of concurrent threads a second weight from a second one of the shared weights registers;

in response to an opcode of the second arithmetic instruction, multiplying the second input value from the second source by the second weight from the second one of the shared weights registers to generate a second result;

placing the second result of the multiplying in the second destination; and

wherein the plurality of weights in the shared weights registers can be written only by the supervisor subprogram, and the shared weights registers can be read only by the plurality of worker threads.

21. The method of claim 20 , wherein executing the first arithmetic instruction comprises: running a program comprising the first arithmetic instruction on the processor through the execution unit.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 14, 2020
From: ALEXANDER, ALAN GRAHAM; KNOWLES, SIMON CHRISTIAN; GORE, MRUDULA CHIDAMBAR
To: GRAPHCORE LIMITED
Reel/Frame 052394/0403 →
Priority Claims (1)
GB 1821301 · Dec 31, 2018 · national
Continuity (1)
Related Publication 20200210175A1 · Jul 2, 2020
References Cited (32)
US 7904702B2 · Leaback et al. · 2011 [cited by applicant]
US 20010003834A1 · Shimonishi · 2001 [cited by applicant]
US 20020038416A1 · Fotland · 2002 [cited by applicant]
US 20050050305A1 · Kissell · 2005 [cited by applicant]
US 20060230408A1 · Frigo · 2006 [cited by applicant]
US 20080140998A1 · Kissell · 2008 [cited by applicant]
US 20080195851A1 · Hoogerbrugge · 2008 [cited by applicant]
US 20090063824A1 · Leaback · 2009 [cited by applicant]
US 20130086367A1 · Gschwind et al. · 2013 [cited by applicant]
US 20130246761A1 · Derby · 2013 [cited by applicant]
US 20150160981A1 · Wang · 2015 [cited by applicant]
US 20160092765A1 · Chilimbi · 2016 [cited by examiner]
US 20160117169A1 · Biran · 2016 [cited by applicant]
US 20160342893A1 · Ross · 2016 [cited by examiner]
US 20180189648A1 · Sengupta · 2018 [cited by examiner]
US 20180321936A1 · Grochowski · 2018 [cited by applicant]
US 20190164043A1 · Litvak · 2019 [cited by examiner]
GB 2340271A · 2000 [cited by applicant]
JP 2000207233A · 2000 [cited by applicant]
JP 2008217210A · 2008 [cited by applicant]
WO WO9954813A1 · 1999 [cited by applicant]
WO WO2019029785A1 · 2019 [cited by examiner]
Brito et al., “GPU-enabled back-propagation artificial neural network for digit recognition in parallel”, Feb. 10, 2016, pp. 3868-3886. [cited by examiner]
Diamos et al., “Persistent RNNs: Stashing Recurrent Weights On-Chip”, 2016, 10 pages. [cited by examiner]
Elango, “Convolutional Neural Network Acceleration on GPU by Exploiting Data Reuse”, Spring 2017, 67 pages. [cited by examiner]
Wikipedia, “Thread pool”, Jun. 2017, 4 pages. [cited by examiner]
Hedge et al., “UCNN: Exploiting Computational Reuse in Deep Neural Networks via Weight Repetition”, Apr. 18, 2018, pp. 1-14. [cited by examiner]
Intel, “IA-64 Application Developer's Architecture Guide”, May 1999, 476 pages. [cited by examiner]
Garland et al., “Low Complexity Multiply-Accumulate Units for Convolutional Neural Networks with Weight Sharing”, ACM Transactions on Architecture and Code Optimization, vol. 15, No. 3, Article 31. Aug. 2018, pp. 1-24. [cited by examiner]
Combined Search and Examination Report for United Kingdom Patent Application No. GB1821301.7 dated Aug. 7, 2019. 8 pages. [cited by applicant]
Office Action issued Aug. 18, 2020 for Japanese Patent Application No. 2019-113329. 5 pages. [cited by applicant]
Preliminary Search Report dated Dec. 17, 2021 for French Patent Application No. 1906119, 11 pages. [cited by applicant]