High-precision neural processing elements

The NPE architecture extends operand bits for DNN layers to enhance precision and reduce power consumption, addressing the inefficiencies of general-purpose processors in battery-powered devices by optimizing DNN operations.

JP7551665B2Active Publication Date: 2024-09-17MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021577355
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-06-28
Filing Date
2020-05-11
Publication Date
2024-09-17
Estimated Expiration
2040-05-11

AI Technical Summary

Technical Problem

Existing general-purpose processors, such as GPUs, consume high power and are not suitable for battery-powered devices like smartphones or VR devices due to their high computational demands for deep neural network (DNN) operations, necessitating the development of more power-efficient ASICs for DNN processing.

Method used

A neural processing element (NPE) architecture that performs high-precision calculations by extending the bit representation of operands from N bits to N+1 bits using hardware AND gates and concatenation circuits, specifically designed for DNN layers like ReLU and Tanh, to enhance accuracy and reduce power consumption.

Benefits of technology

The NPE architecture achieves higher accuracy and lower power consumption in DNN processing, making it suitable for battery-powered devices by utilizing all available bits of operands and optimizing operations based on the type of DNN layer processed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007551665000001
    Figure 0007551665000001
  • Figure 0007551665000004
    Figure 0007551665000004
  • Figure 0007551665000007
    Figure 0007551665000007
Patent Text Reader

Abstract

The neural processing element comprises a hardware AND gate configured to perform a logical AND operation between a sign-extension signal and the most significant bit ("MSB") of the operand. The state of the sign-extension signal can be based on the type of layer of the deep neural network ("DNN") generating the operand. When the sign-extension signal is logical FALSE, no sign extension is performed. When the sign-extension signal is logical TRUE, a concatenator concatenates the output of the hardware AND gate with the operand, thereby extending the operand from an N-bit unsigned binary value to an N+1-bit signed binary value. The neural processing element may also include other hardware AND gates and other concatenators for similarly processing other operands. The concatenator outputs of both operands are provided to a hardware binary multiplier.
Need to check novelty before this filing date? Find Prior Art

Description

[Background technology]

[0001] Deep neural networks ("DNNs") are loosely modeled on the information processing and communication patterns in biological nervous systems such as the human brain. DNNs can be used to solve complex classification problems such as, but not limited to, object detection, semantic labeling, and feature extraction. As a result, DNNs form the basis of many intelligence ("AI") applications such as computer vision, speech recognition, and machine translation. DNNs can match or exceed human accuracy in many of these domains.

[0002] The high level of performance of DNNs comes from their ability to extract high-level features from input data after using statistical learning on large datasets to obtain an effective representation of the input space. However, DNNs' superior performance comes at the cost of high computational complexity. Typically, high-performance general-purpose processors such as graphics processing units ("GPUs") are utilized to provide the high level of computational performance required by many DNN applications.

[0003] Although general-purpose processors such as GPUs can provide high levels of computational performance for implementing DNNs, these types of processors are typically not suitable for use in performing DNN operations for extended periods of time in computing devices where low power consumption is important. For example, general-purpose processors such as GPUs may not be suitable for use in performing extended DNN tasks in battery-powered portable devices such as smartphones or alternative / virtual reality ("AR / VR") devices, where reduced power consumption is required to extend battery life.

[0004] Reduced power consumption while performing continuous DNN tasks such as human motion detection can also be important in devices that are not battery-powered, such as power-over-Ethernet ("POE") security cameras. In this particular example, a POE switch can only provide a limited amount of power, and reducing the power consumption of a POE device such as a security camera allows for the use of a POE switch that provides less power.

[0005] Application-specific integrated circuits ("ASICs") have been developed that can provide superior DNN processing while simultaneously reducing power consumption compared to general-purpose processors. However, despite advances in this field, there is a continuing need to improve the performance and reduce power consumption of ASICs performing DNN processing, especially for use in computing devices where low power consumption is important.

[0006] With regard to these and other technical problems, a method and apparatus for producing such a system is disclosed herein. Summary of the Invention

[0007] Disclosed herein is a neural processing element capable of high-precision calculations. The architecture of the neural processing element disclosed herein allows for greater precision when processing operands generated by certain types of DNN layers. For example, but not by way of limitation, a neural processing element implementing the disclosed technology can take signed or unsigned operands having N bits as input. In certain circumstances, the neural processing element can perform operations on the operands using N+1 bits, thereby providing higher precision compared to architectures in which the neural processing element performs its internal calculations using only N bits. Other technical advantages not specifically described herein may also be realized through implementation of the disclosed subject matter.

[0008] To achieve the technical advantages briefly described above, a DNN processor is disclosed that includes a neural processing element. The neural processing element can take signed or unsigned binary operands having N bits as input. In one particular implementation, the operands are signed or unsigned 8-bit binary numbers. In other implementations, the operands can utilize a different number of bits.

[0009] Neural processing elements also include circuitry for performing high-precision calculations on certain types of operands. For example, neural processing elements can perform extended-precision calculations on operands that are restricted to positive numbers, such as those generated by a rectified linear unit ("ReLU") layer of a DNN. Typically, a signed N-bit value output by a ReLU layer uses only N-1 bits (representing values ​​from -127 to +128) since one bit is reserved for the sign. However, using the disclosed techniques, the neural processing element can utilize all N bits of the operands generated by the ReLU layer (representing values ​​from 0 to 255) in its internal calculations.

[0010] To provide high precision, the neural processing elements are configured with hardware AND gates that are configured to perform a logical AND operation between a binary signal (which may be referred to herein as a "sign extend signal") and the most significant bit ("MSB") of an operand. In the example where the operand is an 8-bit binary number, the MSB is bit 7 of the operand.

[0011] The state of the sign-extension signal can be based on the type of layer of the DNN previously processed by the DNN processor. In particular, the sign-extension signal can be set to logical FALSE if the operand is unsigned, such as when the operand is generated by a ReLU layer of a DNN. In this case, the sign of the operand is not extended, but a 0 bit is prepended to the operand to make it a 9-bit signed number.

[0012] If the sign extension signal is logically TRUE (i.e., the input is signed, such as the output of the Tanh layer), then sign extension is performed on the operand. To perform the sign extension operation, the neural processing element also includes a concatenation circuit ("concatenator") configured to concatenate two binary values. In particular, the concatenator concatenates the output of a hardware AND gate and the operand, thereby extending the operand from an N-bit unsigned value to an N+1-bit signed value. For example, in a configuration where the operand is an 8-bit binary number, the output of the concatenator is a 9-bit signed binary number.

[0013] The neural processing element may also include other hardware AND gates and other concatenators for processing other operands in the manner described above. In this example, the outputs of the concatenators for both operands are provided to a hardware binary multiplier. In a configuration in which the operands are 8-bit binary numbers, the output of the hardware binary multiplier is an 18-bit signed binary number. The neural processing element may continue to process the output of the hardware binary multiplier.

[0014] It should be appreciated that the subject matter described above may be embodied as an article of manufacture, such as a computer controlled apparatus, a computer implemented method, a computing device, or a computer readable medium. These and various other features will become apparent from a reading of the following detailed description and a viewing of the associated drawings.

[0015] This Summary is provided to introduce in a simplified form a brief description of some aspects of the disclosed technology, which are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended that this Summary be used to limit the scope of the claimed subject matter. Moreover, the claimed subject matter is not limited to implementations that solve any or all of the disadvantages noted in any part of the present disclosure. [Brief description of the drawings]

[0016] [Figure 1] FIG. 1 is a computing architecture diagram illustrating aspects of the configuration and operation of a processing system including a DNN processor implementing aspects of the technology disclosed herein, according to one embodiment. [Diagram 2] FIG. 2 is a computing architecture diagram illustrating aspects of the configuration of high-precision neural processing elements, according to one embodiment. [Figure 3A] FIG. 1 is a data diagram showing an illustrative example of the operation of a neural processing element configured using the disclosed techniques. [Figure 3B] FIG. 11 is a data diagram showing another illustrative example of the operation of a neural processing element configured using the disclosed techniques. [Figure 4] 3 is a flow diagram illustrating a routine illustrating aspects of the operation of the neural processing element shown in FIG. 2, according to one embodiment disclosed herein. [Diagram 5] FIG. 1 is a computer architecture diagram illustrating an exemplary computer hardware and software architecture for a computing device that can act as an application host for a DNN processor that includes neural processing elements with high accuracy according to one embodiment. [Figure 6] FIG. 1 is a network diagram illustrating a distributed computing environment in which aspects of the disclosed technology can be implemented in accordance with various embodiments presented herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0017] The following detailed description is directed to high-precision neural processing elements. As briefly described above, implementations of the disclosed techniques can enable neural processing elements to perform their internal calculations with greater precision when processing operands generated by certain types of DNN layers. Other technical advantages not specifically described herein can also be realized through implementation of the disclosed subject matter.

[0018] Although the subject matter described herein is presented in the general context of hardware neural processing elements implemented with a hardware DNN processor, those skilled in the art will recognize that other implementations can be performed in combination with other types of computing systems and modules. Those skilled in the art will also recognize that the subject matter described herein can be implemented with other computer system configurations, including handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, computing or processing systems embedded in devices (such as wearable computing devices, automobiles, home automation, etc.), minicomputers, mainframe computers, etc.

[0019] In the following detailed description, reference is made to the accompanying drawings which form a part hereof, and in which are shown by way of example specific configurations or examples. Referring now to the drawings, in which like numerals represent like elements throughout the several views, aspects of high precision neural processing elements will now be described.

[0020] 1 is a computing architecture diagram illustrating aspects of the configuration and operation of a processing system that implements aspects of the technology disclosed herein, according to one embodiment. In some embodiments, the processing system disclosed herein is configured to solve classification problems (and related problems) such as, but not limited to, eye tracking, hand tracking, object detection, semantic labeling, and feature extraction.

[0021] To provide this functionality, a DNN processor 112 is provided that implements a recall-only neural network and can programmatically support a wide range of network structures. The training for the network performed by the DNN processor 112 can be performed offline in a server farm, data center, or other suitable computing environment. The result of training a DNN is a set of parameters known as "weights" or "kernels." These parameters represent a transformation function that can be applied to the input, and the result is a classification or semantically labeled output.

[0022] The DNN processor 112 disclosed herein can be considered a superscalar processor. The DNN processor 112 can dispatch one or more instructions to multiple execution units, called neural processing elements 105F. The execution units can be "simultaneous dispatch simultaneous complete," with each execution unit synchronized with each of the other execution units. The DNN processor 112 can be classified as a single instruction stream, multiple data stream (SIMD) architecture.

[0023] Neural processing element 105F is a basic unit in a neural network that is used to loosely model biological neural processing elements in the brain. In particular, neural processing element 105F can compute the dot product of an input vector with a weight vector added to a bias with an applied activation function.

[0024] Each neural processing element 105F in the DNN processor 112 can perform weighted sums, max pooling, bypassing, and potentially other types of operations. The neural processing elements 105F process input and weight data every clock cycle. Each neural processing element 105F synchronizes with all other neural processing elements 105F regarding progress within the kernel to minimize kernel data flow within the DNN processor 112.

[0025] Each neural processing element 105F may include a multiplier, an adder, a comparator, and multiple accumulators (not shown in FIG. 1). By having multiple accumulators, the neural processing element 105F can maintain the context of multiple different active kernels at once. Each accumulator can be loaded from a read of SRAM 150 (described below). An accumulator can be summed with the contents of other accumulators from other neural processing elements 105F.

[0026] The DNN processor 112 accepts planar data, such as image data, as input. However, the input to the DNN processor 112 is not limited to image data. Rather, the DNN processor 112 can operate on any input data presented to the DNN processor 112 in a uniform planar format. In one particular embodiment, the DNN processor 112 can accept multi-planar 1-byte or 2-byte data frames as input.

[0027] Each input frame can be convolved with an NxKxHxW set of kernels, where N is the number of kernels, K is the number of channels per kernel, H is the height, and W is the width. The convolutions are performed on overlapping intervals between the input data, where the intervals are defined by strides in the X and Y directions. These functions are performed by the neural processing element 105F and are managed by the DNN processor 112 via software visible control registers. Other types of operations may also be performed, including but not limited to full connectives, batch normalization, and other types of operations.

[0028] The DNN processor 112 supports multiple data types: weights, input data / feature maps, activation data, biases, and scalars. In most cases, input data / feature maps and activation data are two names for the same data, with the difference being that the term activation data is used when referring to the output of a layer. The term input data / feature maps is used when referring to the input of a layer.

[0029] Neural processing element 105F in DNN processor 112 computes a weighted sum of the inputs and passes the weighted sum through an "activation function" or "transfer function." Typically, the transfer function has a sigmoid shape, but may take the form of a piecewise linear function, a step function, or other types of functions. The activation function allows neural processing element 105F to train on a larger set of inputs and the desired output when the classification boundaries are non-linear.

[0030] The DNN processor 112 operates on a list of layer descriptors that correspond to layers of the neural network. The list of layer descriptors can be treated as instructions by the DNN processor 112. These descriptors can be pre-fetched from memory to the DNN processor 112 and executed in sequence. The descriptor list serves as a set of instructions to the DNN processor 112. In some configurations, two types of instructions are utilized: layer descriptors and program instructions that run on a sequence controller. To create the descriptor lists that run on the DNN processor 112, a software tool and / or compiler can run on a device external to the DNN processor 112.

[0031] Generally, there are two main classes of descriptors: memory-to-memory move ("M2M") descriptors and operation descriptors. M2M descriptors can be used to move data between main memory and a local buffer (i.e., buffer 125, described below) for use by the operation descriptor. M2M descriptors follow a different execution pipeline than operation descriptors. The target pipeline for an M2M descriptor may be the internal DMA engine 105B or configuration registers 105G, while the target pipeline for an operation descriptor may be the neural processing element 105F.

[0032] The operation descriptors specify the particular operations that the neural processing element 105F should perform on data structures located in local static random-access memory ("SRAM"). The operation descriptors are processed in order, allowing for many different layers of operations, at least some of which are described herein.

[0033] As shown in FIG. 1, the DNN processor 112 has a memory subsystem with a unique L1 and L2 buffer structure. The L1 and L2 buffers shown in FIG. 1 are specifically designed for neural network processing. By way of example, the L2 buffer 150 can maintain a selected storage capacity with a high-speed private interface operating at a selected frequency. The L1 buffer 125 can maintain a selected storage capacity that can be divided between kernel and activation data. The L1 buffer 125 may be referred to herein as "buffer 125" and the L2 buffer 150 may be referred to herein as SRAM 150.

[0034] In some embodiments, the computation data (i.e., input data, weights, and activation data) is stored in the main row of SRAM 150. The computation data may be organized as two buffers, one buffer containing input data and may be referred to herein as the "input buffer" and the other buffer containing kernel weights and may be referred to herein as the "weight buffer". The buffers are filled from SRAM 150 by load / store unit 105C. Data is accumulated in each buffer until a predetermined capacity is reached. In some embodiments, the buffer data is then copied to a shadow buffer and presented to neural processing element 105F.

[0035] The DNN processor 112 may also include a number of other components, including, but not limited to, a register interface 105G, a prefetch unit 105A, a save / restore unit 105E, a layer controller 105D, and a register interface 105G. In some embodiments, the DNN processor 112 may include additional or alternative components.

[0036] In some configurations, the DNN processor 112 operates in conjunction with other external computing components. For example, in some embodiments, the DNN processor 112 is connected to a host application processor system-on-chip ("host SoC") 130. The DNN processor 112 can be connected to the host SoC 130 through, for example, a PCIe interface. To enable these connections, suitable PCIe components, such as PCIe endpoints 135, are available.

[0037] The host SoC 130 functions as the application processor for the DNN processor 112. The main operating system, applications, and auxiliary sensor processing are executed by the host SoC 130. The host SoC 130 can also connect to an input data source 102, such as an external camera, that provides input data, such as image data, to the DNN processor 112. An additional central processing unit ("CPU" or "processor"), such as a TENSILICA node 140, can also be utilized to coordinate the operation of the DNN processor 112, aspects of which are described below.

[0038] A DDR DRAM 155 can also be connected to the host SoC 130 where it can be used as main system memory. This memory is accessible from the host SoC 130 across a high-bandwidth fabric 120 (e.g., a PCIe bus) by a memory controller 145. The high-bandwidth fabric 120 provides bidirectional direct memory access ("DMA") small messaging transactions and larger DMA transactions. The bridge 115 and low-bandwidth fabric 110 can connect the DNN processor 112 to the host SoC 130 for sub-module configuration and other functions.

[0039] The DNN processor 112 may include a DMA engine 105B configured to move data to and from the main memory 155. In some embodiments, the DMA engine 105B has two channels. One channel is dedicated to fetching operation descriptors and the other channel is dedicated to M2M operations. The DMA descriptors may be embedded in M2M descriptors. A descriptor in this context is a DMA descriptor used to move memory contents, not to be confused with the operation descriptors described above.

[0040] To offload the local SRAM memory 150 and provide more space for input and weight data, the activation outputs can optionally be streamed directly to the DDR memory 155. When streaming data to the DDR memory 155, the DNN processor 112 accumulates enough data for burst transactions on the high-bandwidth fabric 120 and buffers enough transactions to minimize backpressure on the neural processing elements 105F. Further details regarding the operation of the DNN processor 112 are provided below.

[0041] Further details regarding the operation of the DNN processor 112 are provided below. In particular, details regarding the configuration and operation of the neural processing element 105F are provided below with respect to FIGS.

[0042] 2 is a computing architecture diagram illustrating aspects of the configuration and operation of a neural processing element 105F configured for high precision computation. As briefly described above, the architecture of the neural processing element 105F disclosed herein enables higher precision computation when processing operands generated by certain types of DNN layers.

[0043] As briefly described above, the neural processing element 105F takes as inputs operands 202A and 202B (which may be referred to as "operands 202"). Operand 202 may be an N-bit signed or unsigned binary number, where N is a power of 2. For example, in one particular implementation, operand 202 is a signed or unsigned 8-bit binary number. In other implementations, operand 202 may be represented using a different number of bits.

[0044] Also, as briefly described above, in certain circumstances, such as when the operand 202 is generated by a ReLU layer of a DNN, the neural processing element 105F can extend the operand 202 from N bits to N+1 bits. Typically, the signed N-bit value output by the ReLU layer uses only N-1 bits (representing values ​​from -127 to +128 if 8 bits are used) since 1 bit is reserved for the sign. However, using the disclosed techniques, the neural processing element 105F can utilize all N bits of the operand 202 generated by the ReLU layer in its internal calculations (representing values ​​from 0 to 255 if 8 bits are used).

[0045] Once the operands are expanded from N bits to N+1 bits in the manner described below, neural processing element 105F can operate on the N+1 bits of the expanded operands, thereby providing high accuracy compared to architectures in which neural processing element 105F performs its internal calculations using only N bits. Other technical advantages not specifically described herein may be realized through implementation of the disclosed subject matter.

[0046] To provide the functionality disclosed herein, the neural processing element 105F of the DNN processor 112 includes, among other things, hardware AND gates 206A and 206B. The hardware AND gate 206A is configured to perform a logical AND operation between the binary signal 208A (which may be referred to herein as the “sign extended signal 208A”) and the MSB of the operand 202A. The hardware AND gate 206B is configured to perform a logical AND operation between the binary signal 208B (which may be referred to herein as the “sign extended signal 208B”) and the MSB of the operand 202B. In some configurations, the sign extended signal 208 is a 1-bit binary number.

[0047] 2, operands 202A and 202B are 8-bit binary numbers. Thus, hardware AND gate 206A is configured to perform a logical AND operation between sign-extended signal 208A and bit 7 of operand 202A. Similarly, hardware AND gate 206B is configured to perform a logical AND operation between sign-extended signal 208B and bit 7 of operand 202B.

[0048] As briefly described above, the state of the sign extension signal 208 can be set based on the type of layer of the DNN previously processed by the DNN processor 112. In particular, the sign extension signal 208A can be set to logical FALSE if the operand 202A is unsigned, such as when the operand 202A is generated by a ReLU layer of the DNN. Similarly, the sign extension signal 208B can be set to logical FALSE if the operand 202B is unsigned, such as when the operand 202A is generated by a ReLU layer of the DNN. The neural processing element 105F may also set the sign extension signal 208 to logical FALSE if the operand 202 is generated by a DNN layer that can only take positive values.

[0049] In general, the sign extension signal 208 can be set based on the type of activation function (i.e., nonlinearity) applied to the previously processed layer of the DNN. Information identifying the nonlinearity applied to the previous layer of the DNN is provided during processing of the current layer to set the sign extension signal 208. In some configurations, a user can specify a particular activation function for which the sign extension signal 208 should be logically TRUE or logically FALSE.

[0050] If the sign extension signal 208 is TRUE, the neural processing element 105F performs a sign extension operation, which can occur if the previous layer of the DNN is a Tanh ("hyperbolic tangent") layer that produces signed outputs.

[0051] To perform the sign extension operation, the neural processing element also includes concatenation circuits 204A and 204B (which may be referred to herein as “concatenators 204A or 204B”). Concatenators 204A and 204B are circuits configured to concatenate two binary values.

[0052] Concatenator 204A concatenates the 1-bit output of hardware AND gate 206A with operand 202A, thereby expanding the operand from an N-bit value to an N+1-bit value. Similarly, concatenator 204B concatenates the 1-bit output of hardware AND gate 206B with operand 202B, thereby expanding the operand from an N-bit value to an N+1-bit value. In a configuration in which operand 202 is an 8-bit binary number, for example, as shown in FIG. 2, the output of concatenator 204 is a 9-bit signed binary number.

[0053] The signed output 210A and signed output 210B of the concatenators 204A and 204B, respectively, are communicated to a hardware binary multiplier 212. The hardware binary multiplier 212 is a circuit configured to multiply two binary numbers, in this case outputs 210A and 210B. In the example shown in Figure 2, the output 210 is a 9-bit signed binary number and the output 214 of the hardware binary multiplier 212 is an 18-bit signed binary number. The output 214 of the multiplier 212 can be provided to other components within the neural processing element 105F for further processing.

[0054] 3A is a data diagram illustrating an illustrative example of the operation of a neural processing element 105F configured using the disclosed techniques. In this example, operand 202A is an 8-bit unsigned binary number, such as that output by a ReLU layer of a DNN. In this example, because the operand is unsigned, sign extension signal 208A is set to logic FALSE (i.e., 0 in the illustrated example). Thus, output 210A of AND gate 206A is 0 regardless of the value of bit 7 of operand 202A.

[0055] As described above, the output of AND gate 206A (i.e., 0) is concatenated (i.e., prepended) to operator 202A. In the illustrated example, for example, output 210A of AND gate 206A is concatenated with operand 202A, thereby converting 8-bit operand 202A to a 9-bit signed binary number. In this manner, bits 0 through 7 of operand 204A can be used to represent a binary number (e.g., a positive number having a value between 0 and 255). The 9-bit signed output 210A is provided to multiplier 212.

[0056] 3B is a data diagram showing another illustrative example of the operation of a neural processing element 105F configured using the disclosed techniques. The operand 202A shown in FIG. 3B is the same as the operand shown in the above example shown in FIG. 3A. However, in this example, the sign extension signal 208A is set to logical TRUE (i.e., 1 in the illustrative example). Thus, the output 210A of AND gate 206A is 1 if bit 7 (i.e., MSB) of operand 202A is 1, and is 0 if bit 7 (i.e., MSB) of operand 202A is 0.

[0057] As described above, the output of AND gate 206A is concatenated (i.e., prepended) to operand 202A. In the illustrated example, for example, an eighth bit is added to operand 202A. If the value of bit 7 of operand 202A is 1, then the value of the eighth bit is set to 1 (shown in FIG. 3B as output 210A'). If the value of bit 7 of operation 202A is 0, then the value of the eighth bit is set to 0 (shown in FIG. 3B as 210A''). In this manner, the value of the sign bit can be preserved for signed operands 202, which can be positive or negative. A 9-bit signed output 210A is provided to multiplier 212 for use in the above scheme. Although FIGS. 3A and 3B are illustrated with respect to 8-bit operands, it should be appreciated that the same operations are applicable to operands having other numbers of bits.

[0058] 4 is a flow diagram illustrating a routine 400 illustrating aspects of the operation of the neural processing element 105F configured for high accuracy described above with reference to FIGURES 1-3B, in accordance with one embodiment disclosed herein. It should be appreciated that the logical operations described herein with respect to FIGURE 4 and the other figures may be implemented (1) as a sequence of computer-implemented operations or program modules executing on a computing device, and / or (2) as interconnected machine logic circuits or circuit modules within a computing device.

[0059] The particular implementation of the techniques disclosed herein is a matter of choice dependent on the performance and other requirements of the computing device. Accordingly, the logical operations described herein are referred to variously as states, operations, structural devices, operations, or modules. These states, operations, structural devices, operations, and modules may be implemented in hardware, software, firmware, special purpose digital logic, or any combination thereof. It should be appreciated that more or fewer operations may be performed than illustrated in the figures and described herein. These operations may be performed in different orders than those described herein.

[0060] The routine 400 begins at operation 402, where a signed or unsigned binary operand 202 is received. As noted above, the operand 202 is 8 bits in one particular implementation, but may be represented using other numbers of bits in other configurations.

[0061] The routine 400 proceeds from operation 402 to operation 404, where the AND gate 206 performs a logical AND operation on the MSB of the operand 202 and the sign extension signal 208. As noted above, in one embodiment, the sign extension signal 208 is a single-bit signal. The sign extension signal 208 indicates whether a sign extension operation is to be performed on the operand 202 received at operation 402.

[0062] The routine 400 proceeds from operation 404 to operation 406, where the new MSB is added to the N-bit operand 202 to create the N+1-bit signed binary value 210. The routine 400 then proceeds to operation 408, where the result of the logical AND operation performed in operation 404 is stored in the new MSB of the N+1-bit signed value 210. As noted above, in some embodiments, these operations are performed concatenated.

[0063] From operation 408, the routine 400 proceeds to operation 410, where the concatenator 204 communicates the 9-bit signed value to the multiplier 212. The routine 400 then returns to operation 402, where additional operands 202 can be processed in the manner described above.

[0064] 5 is a computer architecture diagram illustrating an example computer hardware and software architecture for a computing device that can function as an application host for the presently described DNN processor 112. In particular, the architecture illustrated in FIG. 5 can be utilized to implement a server computer, a mobile phone, an electronic reader, a smartphone, a desktop computer, an AR / VR device, a tablet computer, a laptop computer, or any other type of computing device suitable for use with the DNN processor 112.

[0065] The computer 500 shown in FIG. 5 includes a central processing unit 502 ("CPU"), a system memory 504 including random access memory ("RAM") 506 and read only memory ("ROM") 508, and a system bus 510 that couples the memory 504 to the CPU 502. A basic input / output system ("BIOS" or "firmware") containing the basic routines that help to transfer information between elements within the computer 500, such as during start-up, may be stored in the ROM 508. The computer 500 further includes a mass storage device 512 for storing an operating system 522, application programs, and other types of programs. The mass storage device 512 may also be configured to store other types of programs and data.

[0066] Mass storage device 512 is connected to CPU 502 through a mass storage controller (not shown) connected to bus 510. Mass storage device 512 and its associated computer readable media provide non-volatile storage for computer 500. Although the description of computer readable media contained herein refers to mass storage devices such as a hard disk, a CD-ROM drive, a DVD-ROM drive, or a USB storage key, it should be recognized by those skilled in the art that computer readable media can be any available computer storage media or communication media that can be accessed by computer 500.

[0067] Communication media includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and includes any distribution media. The term "modulated data signal" means a signal that has one or more of its characteristics changed or set in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media, such as a wired network or direct-wired connection, and wireless media, such as acoustic, radio frequency, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.

[0068] By way of example, and not limitation, computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer-readable instructions, data structures, program modules, or other data. For example, computer storage media includes, but is not limited to, RAM, ROM, EPROM, EEPROM, Flash memory or other solid-state memory technology, CD-ROM, digital versatile disks ("DVD"), HD-DVD, BLU-RAY or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by computer 500.

[0069] According to various configurations, the computer 500 can operate in a networked environment using logical connections to remote computers through a network, such as network 520. The computer 500 can connect to the network 520 through a network interface unit 516 connected to the bus 510. It should be appreciated that the network interface unit 516 can also be utilized to connect to other types of networks and remote computer systems. The computer 500 can also include an input / output controller 518 for receiving and processing input from a number of other devices, including physical sensors, such as a keyboard, a mouse, touch input, an electronic stylus (not shown in FIG. 5), or a video camera. Similarly, the input / output controller 518 can provide output to a display screen or other type of output device (not shown in FIG. 5).

[0070] It should be appreciated that the software components described herein, when loaded and executed by CPU 502, can transform CPU 502 and the entire computer 500 from a general-purpose computing device to a dedicated computing device customized to achieve the functions presented herein. CPU 502 can be composed of any number of transistors or other discrete circuit elements, which can assume any number of states, either individually or together. More specifically, CPU 502 can operate as a finite state machine, depending on the executable instructions contained within the software modules disclosed herein. These computer executable instructions can transform CPU 502 by specifying how CPU 502 transitions between states, thereby transforming the transistors or other discrete hardware elements that make up CPU 502.

[0071] Encoding the software modules presented herein can also transform the physical structure of the computer-readable medium presented herein. In different implementations of this description, the specific transformation of the physical structure depends on various factors. Examples of such factors include, but are not limited to, the technology used to implement the computer-readable medium, whether the computer-readable medium is characterized as primary or secondary storage, etc. For example, if the computer-readable medium is implemented as a semiconductor-based memory, the software disclosed herein can be encoded into the computer-readable medium by transforming the physical state of the semiconductor memory. For example, the software can transform the state of the transistors, capacitors, or other discrete circuit elements that make up the semiconductor memory. The software can also transform the physical state of such components to store data.

[0072] As another example, the computer readable media disclosed herein can be implemented using magnetic or optical technology. In such implementations, the software presented herein can transform the physical state of the magnetic or optical media when the software is encoded therein. These transformations can include changing the magnetic properties of specific locations within a given magnetic medium. These transformations can also include changing the physical features or characteristics of specific locations within a given optical medium to change the optical properties of those locations. Other transformations of physical media are possible without departing from the scope and spirit of this description, and the above examples are provided only to facilitate this description.

[0073] In view of the above, it should be appreciated that many types of physical transformations take place within computer 500 in order to store and execute the software components presented herein. It should also be appreciated that the architecture shown in FIG. 5 for computer 500, or similar architectures, can be utilized to implement other types of computing devices, including handheld computers, video game devices, embedded computer systems, mobile devices such as smartphones, tablets, and AR / VR devices, as well as other types of computing devices known to those skilled in the art. Additionally, computer 500 may not include all of the components shown in FIG. 5, may include other components not explicitly shown in FIG. 5, or may utilize an entirely different architecture than that shown in FIG. 5.

[0074] 6 is a network diagram illustrating a distributed network computing environment 600 in which aspects of the disclosed technology can be implemented, according to various embodiments presented herein. As shown in FIG. 6, one or more server computers 600A can be interconnected with a number of client computing devices, such as, but not limited to, tablet computers 600B, game consoles 600C, smart watches 600D, phones such as smartphones 600E, personal computers 600F, and AR / VR devices 600G, via a communications network 520 (which may be any of, or a combination of, fixed wired or wireless LANs, WANs, intranets, extranets, peer-to-peer networks, virtual private networks, the Internet, Bluetooth communications networks, proprietary low-voltage communications networks, or other communications networks).

[0075] For example, in a network environment where the communications network 520 is the Internet, the server computer 600A may be a dedicated server computer operable to process and communicate data to and from the client computing devices 600B-600G via any of a number of known protocols, such as hypertext transfer protocol ("HTTP"), file transfer protocol ("FTP"), or simple object access protocol ("SOAP"). Additionally, the networked computing environment 600 may utilize a variety of data security protocols, such as secure socket layer ("SSL") or pretty good privacy ("PGP"). Each of the client computing devices 600B-600G may include an operating system operable to support one or more computing applications or terminal sessions, such as a web browser, or other graphical user interface (not shown in FIG. 6), or a mobile desktop environment (not shown in FIG. 6), to gain access to the server computer 600A.

[0076] The server computer 600A can be communicatively coupled to other computing environments (not shown in FIG. 6) and can receive data regarding the interaction / resource network of participating users. In an exemplary operation, users (not shown in FIG. 6) may interact with computing applications executing on the client computing devices 600B-600G to obtain desired data and / or to execute other computing applications.

[0077] Data and / or computing applications may be stored on a server 600A, or multiple servers 600A, and communicated to collaborating users through client computing devices 600B-600G over an exemplary communications network 620. Participating users (not shown in FIG. 6) may request access to particular data and applications housed in whole or in part on the server computer 600A. These data may be communicated between the client computing devices 600B-600G and the server computer 600A for processing and storage.

[0078] The server computer 600A can host computing applications, processes and applets for generating, authenticating, encrypting and communicating data and applications, and may cooperate with other server computing environments (not shown in FIG. 6), third party service providers (not shown in FIG. 6), network attached storage ("NAS") and storage area networks ("SAN") to facilitate application / data transactions.

[0079] It should be appreciated that the computing architecture depicted in Figure 5 and the distributed network computing environment depicted in Figure 6 are simplified for ease of explanation, and that the computing architecture and distributed computing network can include and utilize many more computing components, devices, software programs, networking devices, and other components not specifically described herein.

[0080] The disclosure presented herein also includes subject matter described in the following sections:

[0081] Item 1. A deep neural network (DNN) processor including a plurality of neural processing elements, each of the plurality of neural processing elements including: a first hardware AND gate configured to perform a logical AND operation between a first sign-extended signal and a most significant bit (MSB) of a first operand 202A; a first concatenator configured to concatenate an output of the first hardware AND gate and the first operand and provide a first output to a hardware binary multiplier; a second hardware AND gate configured to perform a logical AND operation between a second sign-extended signal and an MSB of a second operand; and a second concatenator configured to concatenate an output of the second hardware AND gate and the second operand and provide a second output to the hardware binary multiplier.

[0082] Item 2. The deep neural network processor of item 1, wherein the first operand and the second operand comprise signed or unsigned 8-bit binary numbers.

[0083] Item 3. The deep neural network processor of any of items 1 or 2, wherein the first output and the second output include 9-bit signed binary numbers.

[0084] Item 4. A deep neural network processor as described in any one of items 1 to 3, wherein the output of the hardware binary multiplier includes a signed 18-bit binary number.

[0085] Item 5. A deep neural network processor as described in any of items 1 to 4, wherein the MSB of the first operand includes bit 7 of an 8-bit signed or unsigned binary number.

[0086] Item 6. A deep neural network processor as described in any of items 1 to 5, wherein the MSB of the second operand includes bit 7 of an 8-bit signed or unsigned binary number.

[0087] Item 7. A deep neural network processor described in any of items 1 to 6, wherein the state of the first sign extension signal or the second sign extension signal is based on the type of a DNN layer previously processed by the DNN processor.

[0088] Item 8. A deep neural network processor according to any one of items 1 to 7, wherein the layers of the DNN previously processed by the DNN processor include a ReLU layer.

[0089] Item 9. A computer-implemented method comprising: performing a logical AND operation between a first sign-extended signal and a most significant bit (MSB) of a first operand; concatenating an output of a first hardware AND gate and the first operand; and communicating a result of the concatenation of the output of the first hardware AND gate and the first operand to a hardware binary multiplier.

[0090] Item 10. The computer-implemented method of item 9, further comprising the steps of: performing a logical AND operation between a second sign-extended signal and an MSB of a second operand; concatenating an output of a second hardware AND gate and the second operand; and communicating a result of the concatenation of the second hardware AND gate and the second operand to the hardware binary multiplier.

[0091] Item 11. The computer-implemented method of any of items 9 or 10, wherein the first operand and the second operand comprise signed or unsigned 8-bit binary numbers.

[0092] Item 12. The computer-implemented method of any of items 9 or 11, wherein the result of the concatenation of the output of the first hardware AND gate and the first operand and the result of the concatenation of the second hardware AND gate and the second operand comprise 9-bit signed binary numbers.

[0093] Item 13. The computer-implemented method of any of items 9 to 12, wherein an output of the hardware binary multiplier comprises a signed 18-bit binary number.

[0094] Item 14. A computer-implemented method according to any of items 9 to 13, wherein the state of the first sign extension signal or the second sign extension signal is based on a type of layer of a deep neural network (DNN) previously processed by a DNN processor.

[0095] Item 15. The computer-implemented method of any one of items 9 to 14, wherein the layers of the DNN previously processed by the DNN processor include a ReLU layer.

[0096] Item 16. A deep neural network (DNN) processor including a plurality of neural processing elements, each of the neural processing elements being configured to receive an 8-bit operand including a signed binary 8-bit operand or an unsigned 8-bit operand, perform a logical AND operation on a most significant bit (MSB) of the 8-bit operand and a binary signal indicating whether a sign extension operation should be performed on the 8-bit operand, add a new MSB to the 8-bit operand to create a 9-bit signed binary value, store a result of the logical AND operation in the new MSB of the 9-bit signed value, and communicate the 9-bit signed value to a multiplier.

[0097] Item 17. The DNN processor of Item 16, wherein the plurality of neural processing elements are further configured to receive a second 8-bit operand including a signed binary 8-bit operand or an unsigned 8-bit operand, perform a logical AND operation on a most significant bit (MSB) of the second 8-bit operand and a second binary signal indicating whether a sign extension operation should be performed on the second 8-bit operand, add a new MSB to the second 8-bit operand to create a second 9-bit signed binary value, store the result of the logical AND operation in the new MSB of the second 9-bit signed value, and communicate the second 9-bit signed value to the multiplier.

[0098] Item 18. A DNN processor described in either item 16 or 17, wherein the output of the hardware binary multiplier includes a signed 18-bit binary number.

[0099] Item 19. A DNN processor described in any of items 16 to 18, wherein the state of the binary signal is based on the type of a DNN layer previously processed by the DNN processor.

[0100] Item 20. A DNN processor described in any of items 16 to 19, wherein the binary signal indicating whether a sign extension operation should be performed on the 8-bit operand is set based on a nonlinearity applied in a layer of a DNN previously processed by the DNN processor.

[0101] Based on the above, it should be appreciated that a neural processing element capable of providing high accuracy is disclosed herein. Although the subject matter presented herein has been described in language specific to computer structural features, methodological and transformative operations, particular computing machines, and computer-readable media, it should be understood that the subject matter recited in the appended claims is not necessarily limited to the specific features, operations, or media described herein. Rather, the specific features, operations, and media are disclosed as example forms for implementing the claimed subject matter.

[0102] The subject matter described above is provided by way of example only and should not be construed as limiting. Various modifications and changes can be made to the subject matter described herein without following the exemplary configurations and applications shown and described and without departing from the scope of the present disclosure as set forth in the following claims.

Claims

1. 1. A deep neural network (DNN) processor including a plurality of neural processing elements, Each of the plurality of neural processing elements comprises: a first hardware AND gate configured to perform a logical AND operation between the first sign-extended signal and a most significant bit (MSB) of the first operand; a first combiner configured to combine an output of the first hardware AND gate and the first operand and provide a first output to a hardware binary multiplier; a second hardware AND gate configured to perform a logical AND operation between the second sign-extended signal and the MSB of the second operand; a second combiner configured to combine an output of the second hardware AND gate and the second operand and provide a second output to the hardware binary multiplier; A deep neural network processor, including

2. 2. The deep neural network processor of claim 1, wherein the first operand and the second operand comprise signed or unsigned 8-bit binary numbers.

3. 2. The deep neural network processor of claim 1, wherein the first output and the second output comprise 9-bit signed binary numbers.

4. 2. The deep neural network processor of claim 1 , wherein an output of the hardware binary multiplier comprises a signed 18-bit binary number.

5. 2. The deep neural network processor of claim 1, wherein the MSB of the first operand comprises bit 7 of an 8-bit signed or unsigned binary number.

6. 1. A computer-implemented method comprising: performing a logical AND operation between the first sign-extended signal and a most significant bit (MSB) of a first operand; concatenating an output of a first hardware AND gate and the first operand; performing a logical AND operation between the second sign-extended signal and the MSB of the second operand; concatenating an output of a second hardware AND gate with the second operand; communicating a result of the concatenation of the output of the first hardware AND gate with the first operand and a result of the concatenation of the output of the second hardware AND gate with the second operand to a hardware binary multiplier; 23. A computer-implemented method comprising:

7. 7. The computer-implemented method of claim 6, wherein the first operand and the second operand comprise signed or unsigned 8-bit binary numbers.

8. 7. The computer-implemented method of claim 6, wherein the result of the concatenation of the output of the first hardware AND gate with the first operand and the result of the concatenation of the output of the second hardware AND gate with the second operand comprise 9-bit signed binary numbers.

9. 9. The computer-implemented method of claim 8, wherein an output of the hardware binary multiplier comprises a signed 18-bit binary number.

10. 1. A deep neural network (DNN) processor including a plurality of neural processing elements, Each of the neural processing elements comprises: receiving an 8-bit operand, which may be a signed binary 8-bit operand or an unsigned 8-bit operand; performing a logical AND operation on a most significant bit (MSB) of said 8-bit operand and a binary signal indicating whether a sign extension operation should be performed on said 8-bit operand; adding a new MSB to said 8-bit operand to create a first 9-bit signed binary value; storing the result of the logical AND operation in the new MSB of the first 9-bit signed value; receiving a second 8-bit operand comprising a signed binary 8-bit operand or an unsigned 8-bit operand; performing a logical AND operation on a most significant bit (MSB) of the second 8-bit operand and a second binary signal indicating whether a sign extension operation should be performed on the second 8-bit operand; adding a new MSB to the second 8-bit operand to create a second 9-bit signed binary value; storing the result of the logical AND operation in the new MSB of the second 9-bit signed value; A DNN processor configured to communicate the first 9-bit signed value and the second 9-bit signed value to a multiplier.

11. 11. The DNN processor of claim 10, wherein an output of the hardware binary multiplier comprises a signed 18-bit binary number.

12. The DNN processor of claim 11 , wherein the state of the binary signal is based on a type of a layer of a DNN previously processed by the DNN processor.

13. 13. The DNN processor of claim 12, wherein the layers of the DNN previously processed by the DNN processor include a Tanh layer.

Citation Information

Patent Citations

  • Hardware unit for performing matrix multiplication with clock gating

    EP3480691A1

  • Method and device for multiplication of integer with sign

    JP2001100979A

  • Neural network unit performing efficient three-dimensional convolution

    JP2018092560A

  • Efficient combined array for 2n bit n bit multiplications

    US5880985A