IP Library Granted Patent US 12,217,161
Granted Patent B2
US 12,217,161 · App. 17/498,618 · Granted Feb 4, 2025

Convolutional neural network hardware configuration

Inventors: Clifford Gibson (St. Albans, GB); James Imber (Hemel Hempstead, GB)
Assignee: Imagination Technologies Limited
G06N3/063G06F7/00G06F7/5443G06N3/04G06N3/045G06N3/08
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,217,161
App. No.
17/498,618
Granted
Feb 4, 2025
Kind
B2
Abstract

A method of configuring a hardware implementation of a Convolutional Neural Network (CNN), the method comprising: determining, for each of a plurality of layers of the CNN, a first number format for representing weight values in the layer based upon a distribution of weight values for the layer, the first number format comprising a first integer of a first predetermined bit-length and a first exponent value that is fixed for the layer; determining, for each of a plurality of layers of the CNN, a second number format for representing data values in the layer based upon a distribution of expected data values for the layer, the second number format comprising a second integer of a second predetermined bit-length and a second exponent value that is fixed for the layer; and storing the determined number formats for use in configuring the hardware implementation of a CNN.

Claims (56)

1. A computer-implemented method of configuring a hardware implementation of a Convolutional Neural Network (CNN), the method comprising:

receiving, in a computer system, parameters of a CNN having a plurality of layers, said parameters including weight values and expected data values;

determining, in the computer system, for each of a plurality of layers of the CNN, a first number format for representing weight values in the layer based upon a distribution of weight values for the layer, the first number format comprising a first integer of a first predetermined bit-length and a first exponent value that is fixed for the layer;

determining, in the computer system, for each of a plurality of layers of the CNN, a second number format for representing data values in the layer based upon a distribution of expected data values for the layer, the second number format comprising a second integer of a second predetermined bit-length and a second exponent value that is fixed for the layer;

storing in a computer readable storage medium the determined number formats for use in configuring the hardware implementation of a CNN; and

tuning the weight values, the tuning comprising:

selecting, for each of a plurality of layers, a subset of the weight values in that layer, wherein the subset is less than all of the weight values in that layer,

quantising, for each of a plurality of layers, the selected subset of weight values in that layer in accordance with the first number format for that layer to generate modified weight values in that layer, wherein the modified weight values in that layer are less than all of the weight values in that layer, and

training the CNN using the modified weight values to generate tuned weight values.

2. The method of claim 1 , wherein the first and second predetermined bit-lengths are each fixed across a plurality of layers of the CNN.

3. The method of claim 1 , further comprising converting the weight values for each of the plurality of layers of the CNN into the first number format and converting input data to the CNN into the second number format, wherein the converting comprises performing quantisation based upon the first and second number formats.

4. The method of claim 3 , wherein the quantisation is performed based upon nearest-neighbour rounding.

5. The method of claim 3 , further comprising storing the converted weight values for each of the plurality of layers of the CNN and data values to the CNN in a memory accessible by the hardware implementation of the CNN or in one or more buffers in the hardware implementation of the CNN.

6. The method of claim 1 , further comprising storing the weight values for each of the plurality of layers of the CNN, the storing comprising:

storing, for each weight value, a value representing the first integer of that weight value; and

storing, for each layer, a value representing the first exponent value for that layer.

7. The method of claim 1 , further comprising storing the data values for each of the plurality of layers of the CNN, the storing comprising:

storing, for each data value, a value representing the second integer of that data value; and

storing, for each layer, a value representing the second exponent value for that layer.

8. The method of claim 1 , wherein the weight values in each layer of the CNN are generated by training the CNN using a training data set and wherein the generated weight values are in a floating-point format.

9. The method of claim 8 , wherein the distribution of expected data values is derived from the training data set.

10. The method of claim 1 , further comprising determining the first exponent value for each layer by:

identifying a bit index that represents a range of values based upon the distribution of weight values for that layer;

right-shifting the position of the bit index from the identified bit index a number of bits based upon the first predetermined bit-length to identify a first shifted bit index; and

allocating the value of the first shifted bit index as the first exponent value.

11. The method of claim 1 , further comprising determining the second exponent value for each layer by:

identifying a bit index that represents a range of values based upon the distribution of expected data values for that layer;

right-shifting the position of the bit index from the identified bit index a number of bits based upon the second predetermined bit-length to identify a second shifted bit index; and

allocating the value of the second shifted bit index as the second exponent value.

12. A computer system for configuring a hardware implementation of a Convolutional Neural Network (CNN), the computer system comprising:

hardware logic configured to determine, for each of a plurality of layers of the CNN, a first number format for representing weight values in the layer based upon a distribution of weight values for the layer, the first number format comprising a first integer of a first predetermined bit-length and a first exponent value that is fixed for the layer;

hardware logic configured to determine, for each of a plurality of layers of the CNN, a second number format for representing data values in the layer based upon a distribution of expected data values for the layer, the second number format comprising a second integer of a second predetermined bit-length and a second exponent value that is fixed for the layer;

the computer system further configured to store the determined number formats in a computer readable storage medium for use in configuring the hardware implementation of a CNN; and

tune the weight values, wherein tuning the weight values comprises:

selecting, for each of a plurality of layers, a subset of the weight values in that layer, wherein the subset is less than all of the weight values in that layer,

quantising, for each of a plurality of layers, the selected subset of weight values in that layer in accordance with the first number format for that layer to generate modified weight values in that layer, wherein the modified weight values in that layer are less than all of the weight values in that layer, and

training the CNN using the modified weight values to generate tuned weight values.

13. The computer system of claim 12 , wherein the first and second predetermined bit-lengths are each fixed across a plurality of layers of the CNN.

14. The computer system of claim 12 , wherein the computer system is configured to convert the weight values for each of the plurality of layers of the CNN into the first number format and convert input data to the CNN into the second number format, wherein the conversion comprises performing quantisation based upon the first and second number formats.

15. The computer system of claim 14 , wherein the quantisation is performed based upon nearest-neighbour rounding.

16. The computer system of claim 14 , wherein the computer system is configured to store the converted weight values for each of the plurality of layers of the CNN and data values to the CNN in a memory accessible by the hardware implementation of the CNN or in one or more buffers in the hardware implementation of the CNN.

17. The computer system of claim 12 , wherein the computer system is configured to store the weight values for each of the plurality of layers of the CNN, wherein storing the weight values comprises:

storing, for each weight value, a value representing the first integer of that weight value; and

storing, for each layer, a value representing the first exponent value for that layer.

18. The computer system of claim 12 , wherein the computer system is configured to store the data values for each of the plurality of layers of the CNN, wherein storing the data values comprises:

storing, for each data value, a value representing the second integer of that data value; and

storing, for each layer, a value representing the second exponent value for that layer.

19. The computer system of claim 12 , wherein the weight values in each layer of the CNN are generated by training the CNN using a training data set and wherein the generated weight values are in a floating-point format.

20. A non-transitory computer readable storage medium having stored thereon computer executable instructions that when executed cause at least one processor to configure a hardware implementation of a Convolutional Neural Network (CNN), by:

determining, for each of a plurality of layers of the CNN, a first number format for representing weight values in the layer based upon a distribution of weight values for the layer, the first number format comprising a first integer of a first predetermined bit-length and a first exponent value that is fixed for the layer;

determining, for each of a plurality of layers of the CNN, a second number format for representing data values in the layer based upon a distribution of expected data values for the layer, the second number format comprising a second integer of a second predetermined bit-length and a second exponent value that is fixed for the layer;

storing the determined number formats in a computer readable storage medium for use in configuring the hardware implementation of a CNN; and

tuning the weight values, the tuning comprising:

selecting, for each of a plurality of layers, a subset of the weight values in that layer, wherein the subset is less than all of the weight values in that layer,

quantising, for each of a plurality of layers, the selected weight values in that layer in accordance with the first number format for that layer to generate modified weight values in that layer, wherein the selected weight values in that layer are less than all of the weight values in that layer, and

training the CNN using the modified weight values to generate tuned weight values.

Assignments (1)
SECURITY INTEREST Recorded Jul 31, 2024
From: IMAGINATION TECHNOLOGIES LIMITED
To: FORTRESS INVESTMENT GROUP (UK) LTD
Reel/Frame 068221/0001 →
Priority Claims (1)
GB 1607713 · May 3, 2016 · national
Continuity (2)
Continuation 15585645 · May 3, 2017
Related Publication 20220027717A1 · Jan 27, 2022
References Cited (54)
US 9190053B2 · Penn et al. · 2015 [cited by applicant]
US 9424494B1 · Lineback et al. · 2016 [cited by applicant]
US 9430829B2 · Madabhushi et al. · 2016 [cited by applicant]
US 9563825B2 · Shen et al. · 2017 [cited by applicant]
US 9619735B1 · Lineback et al. · 2017 [cited by applicant]
US 20100158408A1 · El-Mahdy et al. · 2010 [cited by applicant]
US 20100215253A1 · Yamamoto et al. · 2010 [cited by applicant]
US 20110029471A1 · Chakradhar et al. · 2011 [cited by applicant]
US 20120183224A1 · Kirsch · 2012 [cited by applicant]
US 20120191955A1 · Jonsson et al. · 2012 [cited by applicant]
US 20140180989A1 · Krizhevsky et al. · 2014 [cited by applicant]
US 20140192066A1 · Savransky et al. · 2014 [cited by applicant]
US 20140288928A1 · Penn et al. · 2014 [cited by applicant]
US 20160026912A1 · Falcon et al. · 2016 [cited by applicant]
US 20160062947A1 · Chetlur et al. · 2016 [cited by applicant]
US 20160342889A1 · Thorson et al. · 2016 [cited by applicant]
US 20160342891A1 · Ross et al. · 2016 [cited by applicant]
US 20160342893A1 · Ross et al. · 2016 [cited by applicant]
US 20170097884A1 · Werner et al. · 2017 [cited by applicant]
US 20170102941A1 · Henry et al. · 2017 [cited by applicant]
US 20170103312A1 · Henry et al. · 2017 [cited by applicant]
CN 102420931A · 2012 [cited by applicant]
CN 104915322A · 2015 [cited by applicant]
CN 105205479A · 2015 [cited by applicant]
GB 2552242A · 2018 [cited by applicant]
GB 2554711A · 2018 [cited by applicant]
GB 2592835A · 2021 [cited by applicant]
JP H07200259A · 1995 [cited by applicant]
JP H09261073A · 1997 [cited by applicant]
WO 9966423A1 · 1999 [cited by applicant]
WO 2016030230A1 · 2016 [cited by applicant]
Anwar et al., “Fixed Point Optimization of Deep Convolutional Neural Networks for Object Recognition”, 2015 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP); Apr. 19, 2015, pp. 1131-1135… [cited by examiner]
Gupta et al., Deep Learning with Limited Numerical Precision, pp. 1-10, Feb. 2015. (Year: 2015). [cited by examiner]
Lin et al., “Fixed Point Quantization of Deep Convolutional Networks”, Jan. 7, 2016, pp. 1-15, 2016. (Year: 2016). [cited by examiner]
Gysel et al., “Hardware-Oriented Approximation of Convolutional Neural Networks”, Apr. 11, 2016, pp. 1-8, 2016. (Year: 2016). [cited by examiner]
Judd et al., Reduced-Precision Strategies for Bounded Memory in Deep Neural Networks, Jan. 2016. (Year: 2016). [cited by examiner]
Lin et al., “Fixed Point Quantization of Deep Convolutional Networks,” Jan. 7, 2016, pp. 1-15. [cited by applicant]
Gysel et al., “Hardware-Oriented Approximation of Convolutional Neural Networks,” Apr. 11, 2016, pp. 1-8. [cited by applicant]
Anwar et al., “Fixed Point Optimization of Deep Convolutional Neural Networks for Object Recognition,” 2015 IEEE Int'l Conference on Acoustics, Speech and Signal Processing (ICASSP), Apr. 19, 2015, pp. 1131-1135. [cited by applicant]
Gupta et al., “Deep Learning with Limited Numerical Precision,” Feb. 2015, pp. 1-10. [cited by applicant]
Brown et al., “Neural Network Number Systems,” Int'l Joint Conference on Neural Networks, pp. 903-907. [cited by applicant]
Chen et al., “DianNao: A Small Footprint High-Throughput Accelerator for Ubiquitous Machine Learning,” https://doi.org/10.1145/2847263.2847267, pp. 269-283. [cited by applicant]
Qiu et al., “Going Deeper with Embedded FPGA Platform for Convolutional Neural Network,” https://doi.org/10.1145/2647263.2847265, pp. 26-34. [cited by applicant]
Gokhale et al., “A 240 G-ops/s Mobile Coprocessor for Deep Neural Networks, ” 2014 IEEE Conference on Computer Vision and Pattern Recognition Workshops, Jun. 23, 2014, pp. 696-701. [cited by applicant]
Yang et al., “A Systematic Approach to Blocking Convolutional Neural Networks,” Jun. 14, 2016, pp. 1-12. [cited by applicant]
Braga et al. (Performance, Accuracy, Power Consumption and Resource Utilization Analysis for Hardware/Software realized Artificial Neural Networks, Sep. 2010, pp. 1629-1636) (Year: 2010). [cited by applicant]
Laudani et al. (On Training Efficiency and Computational Costs of a Feed Forward Neural Network: A Review, Aug. 2015, pp. 1-13) (Year: 2015). [cited by applicant]
Lucas (Temporal Difference Learning with Interpolated Table Value Functions, Sep. 2009, pp. 32-37) (Year: 2009). [cited by applicant]
Yang et al. (Research on Resistor array Non-uniformity Correction with Neural Network, Jul. 2012, pp. 297-302) (Year: 2012). [cited by applicant]
Anonymous, “Blis Retreat 2015”; Sep. 29, 2015; Retrieved from the Internet: URL:http://www.cs.utexas.edu/users/flame/BLISRetreat2015/program.html; p. 2 “A Systematic Approach for Blocking of Convolutional Neural Network… [cited by applicant]
Conti et al., “A Ultra-Low Energy Convolution Engine for Fast Brain-Inspired Vision in Multicore Clusters”, Mar. 2015, pp. 683-688) (Year: 2015). [cited by applicant]
Pedram, “A Systematic Approach for Blocking of Convolutional Neural Networks for Architectures with Hierarchical Memories”; 3rd BLIS Retreat 2015, Sep. 29, 2015; 51 pages. [cited by applicant]
Pedram, Convolutional Neural Networks for Architectures With Hierarchical Memories; Sep. 29, 2015; VLSI Research Group Stanford University; pp. 30-46. [cited by applicant]
Zhang et al, “Optimizing Fpga-Based Accelerator Design for Deep Convolutional Neural Networks”; Proceedings of the 2015 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays, FPGA '15; Feb. 22, 2015; pp. 1… [cited by applicant]