A configurable processor for implementing convolutional neural networks
The configurable CNN processor addresses power and memory inefficiencies by integrating data flow control into the data path, allowing asynchronous operation and reducing redundant memory access, thus achieving efficient and real-time CNN processing.
Patent Information
- Application Number
- JP2022502865
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-05-15
- Filing Date
- 2020-07-20
- Publication Date
- 2024-10-17
- Estimated Expiration
- 2040-07-20
AI Technical Summary
Existing CNN processors face challenges with high power consumption, memory requirements, and inefficiencies in processing complex neural networks due to reliance on external memory and suboptimal architectures that do not support real-time requirements.
A configurable processor architecture for CNNs that includes core computational circuitry, an active memory buffer, and asynchronous connections, optimized for low power consumption by integrating data flow control into the data path, reducing redundant memory access, and allowing modules to operate at different clock speeds.
The architecture achieves efficient CNN processing with reduced power consumption and chip area, enabling real-time performance without external memory access, suitable for mobile and embedded applications.
Smart Images

Figure 0007569109000001 
Figure 0007569109000002 
Figure 0007569109000003
Abstract
Description
[Technical field]
[0001] The subject matter described herein generally relates to machine learning and convolutional neural networks (CNNs). More particularly, the subject matter described herein relates to configurable processors for implementing CNNs.
[0002] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to and the benefit of U.S. Provisional Application No. 63 / 025,580, entitled "Direct Conversion of Raw Image Sensor Input (Bayer-Pattern) to Image / Video Analytics using a Single CNN," filed on May 15, 2020, and having Attorney Docket No. SINHA-1003P2; U.S. Provisional Application No. 62 / 941,646, entitled "Direct Conversion of Raw Image Sensor Input (Bayer-Pattern) to Image / Video Analytics using a Single CNN," filed on November 27, 2019, and having Attorney Docket No. SINHA-1003P1; and U.S. Provisional Application No. 62 / 876,219, entitled "Programmable Functional Array (PFA) Processor for CNNs," filed on July 19, 2019, and having Attorney Docket No. SINHA-1002P2, the entire contents of each of which are incorporated herein by reference. [Background technology]
[0003] Deep learning, sometimes also called deep structured learning or hierarchical learning, is part of a broad family of machine learning methods based on artificial neural networks. Learning can be supervised, semi-supervised or unsupervised. Deep learning architectures such as deep neural networks, deep belief networks, recurrent neural networks and convolutional neural networks (CNNs) have been applied to many domains such as image classification and natural language processing, producing results comparable to human experts. For example, deep learning has led to state-of-the-art performance in image recognition and vision tasks such as object recognition, semantic segmentation, image captioning and human pose estimation. Most of these achievements can be attributed to the use of CNNs, which are capable of learning complex hierarchical feature representations.
[0004] As CNNs grow in complexity, their hardware requirements pose challenges for state-of-the-art implementations. Practical limitations on resources such as memory, computation, and power consumption prevent the exploration of very deep and efficient neural networks. Common approaches to speed up the computation of CNNs used today may include the use of graphical processing units (GPUs) or even custom hardware solutions.
[0005] A 2015 article from Microsoft Research focuses on accelerating deep convolutional neural networks using specialized hardware. A 2016 article presents a binary weight-based ultra-low power convolutional neural network accelerator called YodaNN. A 2017 article presents a reconfigurable architecture that purportedly beats CNN accelerators, claiming 2.2x (e.g., 2.2x) higher throughput, 2.3x energy efficiency, and 26-35% reduced chip area usage. CNNs are trained, typically using backpropagation, to generate the correct output for a set of labeled examples. Training of the network is typically done on hardware platforms such as graphical processing units (GPUs) or highly specialized server-oriented architectures.
[0006] Inference in state-of-the-art (SOA) trained CNNs is computationally expensive, typically using billions of multiply-accumulate (MAC) operations per image. Using a mobile processor or mobile GPU to perform CNN inference can be prohibitively expensive on power-constrained mobile platforms. For example, the NVIDIA Tegra X1 GPU platform, targeted at mobile autonomous driving assistance (ADAS) applications, is reported to be able to process 640x360 color input frames through a computationally efficient semantic segmentation CNN at a rate of 15 Hertz (Hz). Thus, processing each frame through this CNN would require approximately 2 billion MAC operations. Thus, the GPU performs approximately 60 billion (giga) operations per second (GOps / s) while consuming approximately 10 watts (W). Thus, at the application level, this GPU achieves a power efficiency of approximately 6GOps / W, which is only about 6% of the theoretical maximum performance. As a result, the NVIDIA solution can process CNNs at just 30 frames per second (FPS) when the network requires less than 2 GOps / frame.
[0007] An important development in CNN research related to hardware accelerators is the use of CNN training methods that use low precision weights, activations, and sometimes backpropagated gradients. Training networks that use low precision parameters and rectified linear unit (ReLU) activation functions can increase the sparsity of activations by up to 50%. Sparse networks are effective in minimizing computation and memory accesses during inference. Several dedicated accelerators have been reported that already exploit this sparsity. For example, a CNN hardware accelerator called NullHop exploits the sparsity of activations. A power-optimized implementation of Groq's CNN inference accelerator has been reported to consume 8 tera-operations per second (TOPS) per watt, making it highly efficient. Another efficient CNN inference accelerator, the Gyrfalcon technology, is reported to have a power consumption of 9.3 TOPS / W.
[0008] However, the above-mentioned approaches to CNN processors or accelerators suffer from one or more deficiencies. For example, they often use architectures that require the use of external memory. Also, each of the above-mentioned approaches uses architectures that are not compatible with real-time requirements and / or are not well suited to CNN architectures. As a result, there is a need for an improved CNN processor that addresses these shortcomings. Summary of the Invention
[0009] The following presents a simplified summary of some aspects of the present disclosure in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all envisioned features of the present disclosure, and is not intended to identify key or critical elements of all aspects of the present disclosure or to delineate the scope of any or all aspects of the present disclosure. Its sole purpose is to present various concepts of some aspects of the present disclosure in a simplified form as a prelude to the more detailed description that is presented later.
[0010] In one aspect, the present disclosure provides a configurable processor dedicated to implementing a convolutional neural network (CNN), the configurable processor comprising: a plurality of core computation circuit elements, each configured to perform a CNN function according to a preselected dataflow graph; an active memory buffer; a plurality of connections between the active memory buffer and the plurality of core computation circuit elements, each established according to the preselected dataflow graph; and a plurality of connections between the plurality of core computation circuit elements, each established according to the preselected dataflow graph, the active memory buffer configured to move data between the plurality of core computation circuit elements via the active memory buffer according to the preselected dataflow graph.
[0011] In one embodiment, the pre-selected data flow graph is based on a pre-selected CNN.
[0012] In one aspect, each of the plurality of core computational circuit elements is configured to execute a CNN function according to a preselected data flow graph without the use of an instruction set.
[0013] In one aspect, at least two of the plurality of core computational circuit elements are configured to operate asynchronously with respect to one another.
[0014] In one aspect, the active memory buffer and each of the plurality of core computational circuit elements are configured to operate asynchronously with respect to one another.
[0015] In one embodiment, each of the plurality of core computational circuit elements is dedicated to performing a CNN function.
[0016] In one aspect, each of the plurality of core computational circuit elements is configured to execute a CNN function prior to the execution time of the configurable processor.
[0017] In one aspect, each of the plurality of core computational circuit elements is configured to compute a layer of a CNN function.
[0018] In one embodiment, each of the plurality of core computational circuit elements is configured to compute an entire CNN.
[0019] In one aspect, each of the plurality of core computational circuit elements is configured to execute a CNN function for both inference and training.
[0020] In one aspect, each of the plurality of core computational circuit elements comprises a memory configured to store weights used to perform the CNN function.
[0021] In one aspect, connections between the active memory buffer and the core computational circuit elements are established at compile time and fixed at run time of the configurable processor, and connections between the core computational circuit elements are established at compile time and fixed at run time.
[0022] In one aspect, the present disclosure further provides a processor array comprising a plurality of configurable processors as described above, interconnect circuitry, and a plurality of connections between the plurality of configurable processors and / or the interconnect circuitry, each connection established according to a preselected data flow graph.
[0023] In one aspect, the present disclosure further provides a system comprising a Mobile Industry Processor Interface (MIPI) source, a MIPI sink, a MIPI bus coupled between the MIPI source and the MIPI sink, and a configurable processor as described above, the configurable processor being arranged in series along the MIPI bus such that all data on the MIPI bus passes through the configurable processor.
[0024] In one embodiment, the system further comprises a non-MIPI output interface including at least one of an SPI, an I2C interface, or a UART interface, and the configurable processor is configured to transmit information to an external device using either the non-MIPI output interface or the MIPI bus.
[0025] In one aspect, the disclosure further provides a system comprising a sensor configured to generate sensor data, a configurable processor as described above, the configurable processor directly coupled to the sensor and configured to generate processed data based on the sensor data, and a wireless transmitter directly coupled to the configurable processor and configured to transmit at least a portion of the processed data. In one aspect, the sensor data includes image data, the processed data includes classification data generated based on the image data, and the wireless transmitter is configured to transmit the classification data.
[0026] In one aspect, the present disclosure further provides a method for configuring a configurable processor specialized for implementing a convolutional neural network (CNN), the method comprising the steps of receiving a preselected data flow graph, programming each of a plurality of core computation circuit elements to perform a CNN function according to the preselected data flow graph, programming an active memory buffer according to the preselected data flow graph, programming a plurality of connections between the active memory buffer and the plurality of core computation circuit elements according to the preselected data flow graph, programming a plurality of connections between the plurality of core computation circuit elements according to the preselected data flow graph, and programming the active memory buffer to move data between the plurality of core computation circuit elements via the memory buffer according to the preselected data flow graph.
[0027] In one aspect, each of the programming operations is performed prior to run time of the configurable processor.
[0028] In one aspect, the method further includes operating a plurality of core computational circuit elements to perform a CNN function without the use of an instruction set, and operating an active memory buffer without the use of an instruction set.
[0029] In one embodiment, the pre-selected data flow graph is based on a pre-selected CNN.
[0030] In one aspect, the method further includes operating at least two of the plurality of core computational circuit elements asynchronously with respect to one another.
[0031] In one aspect, the method further comprises operating the active memory buffer and each of the plurality of core computational circuit elements asynchronously with respect to one another.
[0032] In one embodiment, each of the plurality of core computational circuit elements is dedicated to performing a CNN function.
[0033] In one aspect, the method further includes executing, upon execution of the configurable processor, a CNN function in each one of the plurality of core computational circuit elements.
[0034] In one aspect, the method further includes computing, upon execution of the configurable processor, a layer of the CNN function in a respective one of the plurality of core computational circuit elements.
[0035] In one aspect, the method further includes computing the entire CNN in at least one of the plurality of core computational circuit elements upon execution of the configurable processor.
[0036] In one aspect, connections between the active memory buffer and the core computational circuit elements are programmed at compile time and fixed at run time of the configurable processor, and connections between the core computational circuit elements are programmed at compile time and fixed at run time.
[0037] In one aspect, each of the plurality of core computational circuit elements is configured to execute a CNN function for both inference and training.
[0038] In one aspect, each of the plurality of core computational circuit elements comprises a memory configured to store weights used to perform the CNN function.
[0039] In one aspect, the disclosure further provides a configurable processor specialized for implementing a convolutional neural network (CNN), the configurable processor comprising: a plurality of means for performing a CNN function according to a preselected data flow graph; a means for storing data; a means for establishing a connection between the means for storing data and the plurality of means for performing the CNN function according to the preselected data flow graph; and a means for establishing a connection between the plurality of means for performing the CNN function according to the preselected data flow graph, the means for storing data comprising means for moving data between the plurality of means for performing the CNN function via the means for storing data according to the preselected data flow graph.
[0040] In one aspect, the disclosure further provides a configurable processor specialized for implementing a convolutional neural network (CNN), the configurable processor comprising: a Mobile Industry Processor Interface (MIPI) input configured to be directly coupled to a MIPI source; a MIPI output configured to be directly coupled to an application processor; a MIPI bus coupled between the MIPI input and the MIPI output; and a configurable CNN sub-processor arranged in series along the MIPI bus such that all data on the MIPI bus passes through the configurable processor, the configurable CNN sub-processor configured to receive image data from the MIPI source, generate processed data based on the image data, and provide the processed data to the application processor.
[0041] In one embodiment, the configurable CNN sub-processor is further configured to generate processed data based on the image data using a pre-selected CNN.
[0042] In one embodiment, the configurable CNN sub-processor includes multiple configurable CNN sub-processors in a cascaded configuration.
[0043] In one embodiment, the configurable CNN sub-processor is configured to provide processed data to an application processor via a MIPI bus.
[0044] In one aspect, a configurable CNN sub-processor comprises a plurality of core computation circuit elements, each configured to perform a CNN function according to a preselected dataflow graph; an active memory buffer; a plurality of connections between the active memory buffer and the plurality of core computation circuit elements, each established according to a preselected dataflow graph; and a plurality of connections between the plurality of core computation circuit elements, each established according to a preselected dataflow graph, wherein the active memory buffer is configured to move data between the plurality of core computation circuit elements via the active memory buffer according to the preselected dataflow graph.
[0045] In one embodiment, the configurable CNN sub-processor further comprises a non-MIPI output interface including at least one of an SPI, an I2C interface, or a UART interface, and the configurable processor is configured to send information to the application processor using either the non-MIPI output interface or the MIPI bus. [Brief description of the drawings]
[0046] [Figure 1] FIG. 1 is a block diagram illustrating an example configurable processor for implementing a convolutional neural network (CNN) including an active memory buffer and multiple core computation elements in accordance with some aspects of the disclosure. [Diagram 2] FIG. 2 is a flowchart illustrating a process for configuring a configurable processor to implement a CNN according to some aspects of the disclosure. [Diagram 3]FIG. 3 is a block diagram illustrating an example configurable processor for implementing a CNN embodied as a programmable functional unit (PFU) in accordance with some aspects of the disclosure. [Figure 4] FIG. 4 is a block diagram illustrating a configurable CNN processor embodied as a programmable function array (PFA) including multiple PFUs, according to some aspects of the present disclosure. [Diagram 5] FIG. 5 is a block diagram illustrating a configurable CNN processor embodied as a system including multiple PFAs in a cascaded configuration, according to some aspects of the disclosure. [Figure 6] FIG. 6 is a block diagram illustrating an example active memory buffer for use within a configurable CNN processor according to some aspects of the disclosure. [Figure 7] FIG. 7 is a perspective view illustrating an example memory configuration for an active memory buffer in accordance with some aspects of the disclosure. [Figure 8] FIG. 8 is a timing diagram illustrating an example protocol for transmitting data from an active memory buffer to a core computational element in accordance with some aspects of the disclosure. [Figure 9] FIG. 9 is a timing diagram illustrating an example protocol for receiving data from a core computational element in an active memory buffer in accordance with some aspects of the disclosure. [Figure 10] FIG. 10 is a block diagram illustrating example core computational elements for use within a configurable CNN processor according to some aspects of the disclosure. [Figure 11] FIG. 11 is a block diagram illustrating an example control unit for use within a core computational element in accordance with some aspects of the disclosure. [Figure 12] FIG. 12 is a diagram illustrating an example CNN according to some aspects of the present disclosure. [Figure 13] FIG. 13 is a block diagram illustrating a convolution operation of the example CNN of FIG. 12 in accordance with some aspects of the present disclosure. [Figure 14]FIG. 14 is a block diagram illustrating forward and backpropagation passes of the example CNN of FIG. 12 in accordance with some aspects of the present disclosure. [Figure 15] FIG. 15 is a block diagram illustrating three example transformations for mapping portions of a CNN to core computational elements in accordance with some aspects of the disclosure. [Figure 16] FIG. 16 is a block diagram illustrating a possible mapping of the example CNN of FIG. 12 onto core computational elements using multiple line buffers, in accordance with some aspects of the disclosure. [Figure 17] FIG. 17 is a single block diagram of a possible mapping to core computational elements of the example CNN of FIG. 12, where line buffers are aggregated into active memory buffers, in accordance with some aspects of the disclosure. [Figure 18] FIG. 18 is a single block diagram of a possible mapping to core computational elements of the example CNN of FIG. 12, where line buffers are aggregated into active memory buffers, in accordance with some aspects of the disclosure. [Figure 19] FIG. 19 is a block diagram illustrating a first example CNN mapped to a configurable CNN processor according to some aspects of the disclosure. [Figure 20] FIG. 20 is a block diagram illustrating a resulting mapping of a configurable CNN processor using the first example CNN of FIG. 19 in accordance with some aspects of the disclosure. [Figure 21] FIG. 21 is a block diagram illustrating a second example CNN mapped to a configurable CNN processor according to some aspects of the disclosure. [Figure 22] FIG. 22 is a block diagram illustrating a resulting mapping of a configurable CNN processor using the second example CNN of FIG. 21 in accordance with some aspects of the disclosure. [Diagram 23] FIG. 23 is a block diagram illustrating a third example CNN mapped to a configurable CNN processor in accordance with certain aspects of the disclosure. [Figure 24]FIG. 24 is a block diagram illustrating a resulting mapping of a configurable CNN processor using the third example CNN of FIG. 23 in accordance with some aspects of the disclosure. [Diagram 25] FIG. 25 is a block diagram illustrating a first use case of a configurable CNN processor in a MIPI application in accordance with some aspects of the disclosure. [Figure 26] FIG. 26 is a block diagram illustrating a second use case of a configurable CNN processor in a MIPI application in accordance with some aspects of the disclosure. [Figure 27] FIG. 27 is a block diagram illustrating a third use case of a configurable CNN processor in a MIPI application in accordance with some aspects of the disclosure. [Figure 28] FIG. 28 is a block diagram illustrating a fourth use case of a configurable CNN processor in a MIPI application in accordance with some aspects of the disclosure. [Figure 29] FIG. 29 is a block diagram illustrating a fifth use case of a configurable CNN processor in a direct sensor interface application in accordance with some aspects of the disclosure. [Diagram 30] FIG. 30 is a flow chart illustrating a process for operating a configurable CNN processor in a MIPI application according to some aspects of the disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0047] Referring now to the drawings, there are shown embodiments of configurable processors for implementing convolutional neural networks (CNNs). These configurable processors may be dedicated to implementing CNNs and may include a plurality of core computation circuit elements, each configured to perform a CNN function according to a preselected data flow graph (e.g., corresponding to a preselected CNN), an active memory buffer, connections between the active memory buffer and the plurality of core computation circuit elements, each established according to a preselected data flow graph, and connections between the plurality of core computation circuit elements, each established according to a preselected data flow graph, and an active memory buffer configured to move data between the plurality of core computation circuit elements via the active memory buffer according to the preselected data flow graph. Thus, these configurable processors may include an architecture that allows for efficient performance of CNN functions while avoiding the pitfalls of traditional instruction set architecture (ISA or load / store architecture) type processors that are not specifically configured to implement CNNs.
[0048] overview One drawback of the architectures described above for Groq and Gyrfalcon is that they merely provide a traditional load / store architecture paradigm, without any specialization for CNN architectures. Traditional load / store architectures have a separate mechanism to pre-program the intended task, but the data to be manipulated is handled separately by a regular datapath architecture. In the configurable CNN processor architecture described herein, a major part of the program control sequence is injected into the dataflow itself, making it a very efficient processor, while at the same time highly specialized for CNN processing.
[0049] One design goal is to develop a processor architecture intended to compute various CNN architectures. Ideally, this architecture should be low-cost, low-power, and able to process CNN architectures in real-time without accessing external memory. In one aspect, the configurable CNN processor described herein can be used as a co-processor to a system to compute the CNN architectures. This allows for the use of architecture techniques that constrain the processor's use of power. The present disclosure presents one or more extremely low-power solutions by eliminating the need for traditional controllers for data flow control. In one aspect, the present disclosure couples the control of data flow across the various modules of the processor with the data inflow into the architecture. Thus, the incoming data can be responsible for pushing data to the outputs through the system. This type of architecture represents a data flow architecture. In one aspect, the present disclosure also includes the use of hierarchically distributed microprogrammed control memory for parts of the control flow that cannot be coupled with the data-flow of the entire system.
[0050] CNN architectures may require large amounts of temporary memory to store output data for all layers of the CNN. The present disclosure arranges data such that the memory needs of various layers of the CNN can be aggregated and addressed using memory located in one physical space. This has significant advantages in power consumption and area efficiency. At the same time, the disclosed architecture takes advantage of the fact that only a certain number of input rows need to be stored to successfully compute the convolutions in each CNN layer, and the convolution stage of the CNN does not need to store the entire frame. Thus, the disclosed processor architecture, in some embodiments, can store only the line buffers required for the input of each CNN. This has compounding effects, including a reduction in the net power consumption and chip area used by the entire architecture.
[0051] In one aspect, a configurable CNN processor includes an intelligent memory buffer (e.g., an active memory buffer) that can have multiple input ports and multiple output ports. The intelligent memory buffer receives input data from multiple input data ports and stores it in a core memory array contained within the buffer. The intelligent memory buffer can use multiple output ports to distribute the desired data to the correct core computation elements (e.g., computation core modules) in an order that is standardized across the system while maintaining a standard protocol for carrying data. This distribution of data can eliminate the need to use program sequences to control the flow of data movement. Thus, each core computation element / module can maintain a very simple profile of processing a repetitive task with a specific period on the data. Minimal programming information that cannot be easily incorporated into the data flow control can be stored as a control sequence in the form of hierarchically distributed microprogrammed control units contained in each core computation element.
[0052] After processing the data corresponding to a particular CNN layer, the data can be written back to an intelligent memory buffer. Once the data is available from the output of the CNN layer, the processing of the next layer can begin. Thus, the flow of data can be controlled by the rate at which data flows into the system. This eliminates the need for a load-store architecture to manage the flow of data throughout the system. Also, data is moved within the configurable CNN processor architecture in a very intelligent manner that minimizes redundant data movement.
[0053] To reduce redundant data transfers from memory to the computational units, there are several modes of data transfer from the intelligent memory buffer. Data flow into and out of the intelligent buffer can be managed using elastic FIFOs, allowing data to be flexibly moved throughout the system, making all internal data transfers more fluid. In one aspect, it is expected that the intelligent memory buffer will withstand a large amount of fan-out driving a large number of computational modules operating in parallel. This can typically result in a relatively high power penalty resulting from using multiple buffers to meet timing requirements. In one aspect, this can increase even more exponentially in chip layouts with smaller and smaller transistors. In order to decouple timing constraints from the data passing through and into the core computational elements, all inputs and outputs of the computational modules can be buffered using FIFOs. This allows the various components in the system to operate asynchronously with each other. Additionally, this allows the various core computational elements to operate at different clock speeds, optimizing power consumption.
[0054] Each core computation element is a highly flexible module and can perform computations on small blocks of data. Each of the core computation elements can communicate with nearby core computation elements apart from communicating with an intelligent memory buffer. The core computation elements can be arranged in a hierarchical manner. A group of hierarchically arranged core computation elements can be grouped together with an intelligent memory buffer to form an easily expandable unit. This makes the system highly modular and easy to expand. The modular system can run multiple CNN architectures (e.g., multiple CNNs) in parallel and can also cascade multiple instances of such expandable modules together to implement very large CNN architectures.
[0055] In one aspect, at least some of the architectures presented herein can ensure a low power profile by optimizing the overall read and write operations from memory. The configurable CNN processor architecture can also provide a mechanism to move data across memory and computation blocks in a highly efficient and optimal manner. In one aspect, any redundant data movement between modules can be reduced. In one aspect, optimal power consumption can result from ensuring only the necessary bits toggle, reducing redundancy and unnecessary toggling of bits throughout the system. The overall system architecture of incorporating data flow control into the data can further enhance optimal power consumption of the modules. The design can also allow all core computational elements and active memory buffers, or at least a subset of these components, to operate in separate clock domains, thereby reducing the clock distribution power of the high frequency clock.
[0056] In one aspect, the core computational elements can be dynamically configured to use a higher frequency clock and the operating clock frequency of the intelligent memory buffer can be configured to use a lower frequency clock for optimal power consumption. The core computational elements can operate under various operating modes and each can be dynamically configured as: (1) a generic filter, (2) a separable filter, (3) a filter across multiple frames (e.g., 3D convolution operations) if time is another filter dimension, or (4) a long short-term memory (LSTM) cell if each of the core computational elements is dynamically configured into multiple parallel LSTM cells.
[0057] The present disclosure further presents a routing algorithm that illustrates the mapping of CNN algorithms onto the configurable CNN processor. The present disclosure demonstrates, at least in one aspect, that the architecture of the configurable CNN processor is sufficiently generic to allow mapping of different kinds of CNN algorithms.
[0058] An Exemplary Configurable CNN Processor FIG. 1 is a block diagram illustrating an example configurable processor 100 for implementing a convolutional neural network (CNN) including an active memory buffer 102 and multiple core computation elements (104-1, 104-2, 104-3, 104-4, collectively referred to as 104) according to some aspects of the disclosure. Each of the core computation elements (e.g., core computation circuit elements) 104 may be configured to perform a CNN function according to a preselected data flow graph. The preselected data flow graph may be derived from a preselected CNN implemented in the processor 100. The CNN function may include one or more of a convolution function, a downsampling (e.g., pooling) function, an upsampling function, a native 1×1 convolution function, a native N×N convolution (e.g., 3×3, as described in further detail herein) function, a configurable activation function with look-up table (LUT) value interpolation, an integration function, a local response normalization function, and a local batch normalization function. Each of the core computational elements may include LSTM cells and / or shallow-depth elastic FIFO buffered inputs and outputs. Further details regarding the core computational elements 104 are provided below.
[0059] The active memory buffer 102 can be configured to move data between the core computing circuit elements according to a preselected data flow graph. The active memory buffer 102 can include sufficient memory for their operations and to accommodate a large number of core computing elements.
[0060] A coupling fabric (not shown) exists between the core computational elements 104 and the active memory buffer 102 such that connections between the active memory buffer 102 and the core computational elements 104 are established as needed. Similarly, the coupling fabric can enable connections between the core computational elements 104 as needed. The coupling fabric is configured such that those connections are established according to a preselected data flow graph that corresponds to the preselected CNN being implemented.
[0061] 1, the configurable CNN processor 100 includes four core computational elements 104. In one aspect, the configurable CNN processor 100 may include more or less than four core computational elements 104.
[0062] In one embodiment, each of the core computation circuit elements 104 is configured to execute the CNN function without using an instruction set according to a preselected data flow graph. In one embodiment, at least two of the core computation circuit elements 104 are configured to operate asynchronously with each other. In one embodiment, the active memory buffer 102 is configured to operate asynchronously from one or more of the core computation circuit elements 104. In one embodiment, each of the core computation circuit elements 104 is dedicated to execute the CNN function. For example, in one embodiment, each of the core computation circuit elements 104 can be specifically configured to compute only the CNN function, rather than the general processing tasks typically performed by, for example, a general purpose processor.
[0063] In one aspect, prior to run time of the configurable processor 100, each of the core computation circuit elements 104 is configured to execute a CNN function. In one aspect, each of the core computation circuit elements 104 is configured to compute a layer (e.g., a stage) of the CNN function. In one aspect, each of the core computation circuit elements 104 is configured to compute the entire CNN.
[0064] In one aspect, connections between active memory buffers 102 and core computational circuitry 104 are established at compile time and fixed at run time of configurable processor 100. Similarly, in one aspect, connections between core computational circuitry 104 are established at compile time and fixed at run time.
[0065] Further details regarding the active memory buffer 102 and the core computational circuitry 104 are provided below.
[0066] In one embodiment, each of the core computation elements 104 can function as a means for executing a CNN function according to a preselected data flow graph, similar to the core computation elements 304 and 1000 described below. In one embodiment, the active memory buffer 102 can function as a means for storing data and as a means for moving data between a plurality of means for executing a CNN function (e.g., core computation elements) via a means for storing data according to a preselected data flow graph, similar to the active memory buffers 302 and 600 described below. In one embodiment, a coupling fabric (not shown in FIG. 1, but see FIGS. 3 and 15) can function as a means for establishing a connection between a means for storing data (active memory buffers) and a plurality of means for executing a CNN function (core computation elements) according to a preselected data flow graph. This coupling fabric can also function as a means for establishing a connection between a plurality of means for executing a CNN function (core computation elements) according to a preselected data flow graph.
[0067] 2 is a flow chart illustrating a process 200 for configuring a configurable processor to implement a CNN according to some aspects of the disclosure. In one aspect, the process 200 may be performed by a computer coupled to a configurable CNN processor (e.g., the configurable CNN processor 100 of FIG. 1). In block 202, the process receives a preselected dataflow graph. In one aspect, the preselected dataflow graph corresponds to and is derived from a preselected CNN to be implemented.
[0068] At block 204, the process programs each of the multiple core computational circuit elements to execute a CNN function according to a preselected data flow graph. The CNN functions may include one or more of a convolution function, a downsampling (e.g., pooling) function, an upsampling function, a native 1×1 convolution function, a native N×N convolution (e.g., 3×3 as described in further detail herein) function, a configurable activation function with look-up table (LUT) value interpolation, an integration function, a local response normalization function, and a local batch normalization function.
[0069] In block 206, the process programs an active memory buffer (eg, active memory buffer 102 of FIG. 1) according to the preselected data flow graph.
[0070] At block 208, the process programs a number of connections between an active memory buffer (eg, 102) and a number of core computational circuit elements (eg, 104) according to a preselected data flow graph.
[0071] In block 210, the process programs a number of connections between a number of core computational circuit elements according to a preselected data flow graph. The term "program" as used in blocks 210, 208 means that the process establishes the various connections between the components prior to run time using a connectivity fabric present in the CNN processor to connect those components.
[0072] In block 212, the process programs an active memory buffer (e.g., 102) to move data between multiple core computing circuit elements (e.g., 104) via the memory buffer according to a preselected data flow graph.
[0073] In one aspect, each of the programming operations (eg, those described in blocks 204-212) is performed prior to run time of the configurable processor.
[0074] In one aspect, the process further includes operating a plurality of core computational circuit elements to perform the CNN function without the use of an instruction set and / or operating an active memory buffer without the use of an instruction set.
[0075] 3 is a block diagram illustrating an example configurable processor 300 for implementing a CNN embodied as a programmable functional unit (PFU) according to some aspects of the disclosure. The PFU 300 includes an intelligent memory buffer (e.g., active memory buffer) 302, 16 core computation elements 304 in a hierarchical computation unit 306, and a parallel SPI interface 308. In one aspect, the active memory buffer 302 and the core computation elements (e.g., core computation circuit elements) 304 can operate as described above with respect to FIGS. 1 and 2.
[0076] 3 can be viewed as a hierarchical representation of multiple core computational elements / modules 304 with a single intelligent memory buffer 302, which can be collectively referred to as a PFU. Each of the core computational elements 304 is accessible via several read and write ports of the intelligent memory buffer 302. The PFU 300 further includes an input data interface 310 and an output data interface 312. Input data received via the input data interface 310 and output data transmitted via the output data interface 312 can directly interface with the read and write ports in the intelligent memory buffer 302, respectively. This allows other PFU units to communicate with each other point-to-point via the read and write ports based on the configuration of the transmitter and receiver.
[0077] The read port (e.g., any one of the M input ports) and the write port (e.g., any one of the N output ports) can also be used to serialize and deserialize data communicated via a serial-parallel interface 308, such as an SPI, with other PFUs on different chips. The SPI 308 can provide a relatively low-power implementation of a communication channel between two PFUs across a chip boundary. In one embodiment, the PFU 300 is implemented using a single chip. Data transmitted via the parallel interface 308 in the PFU chip can be serialized, transmitted across a printed circuit board (PCB), and then parallelized upon receipt at the destination chip (e.g., the second PFU). The serial link can be any kind of serial link, from a simple SPI to a more complex clock-embedded link.
[0078] The PFU 300 may also include an interface with an external memory outside the PFU for the core computational elements to access a larger memory pool. In a typical CNN, only a few layers need to access a large number of weights, specifically the fully connected layer. Since there are few CNN layers that need to access a large number of weights, each PFU may be configured with only enough weight memory to store the average number of weights used in a convolutional layer. As used herein, "weight memory" refers to the memory of a core computational element used to store weights for processing / computing a CNN layer. Whenever a core computational element needs to access a larger weight memory, it can fetch it from an external larger memory pool. However, the memory bandwidth of the external memory may be sufficient to support two core computational elements without back pressure. A larger number of core computational elements accessing a larger weight memory pool may result in a decrease in throughput.
[0079] If a particular convolution operation cannot fit into a single core computation element due to weight memory constraints, it is also possible to split the convolution across multiple core computation elements using a convolution transform (e.g., as shown in case 2 of Figure 15). This mechanism allows a typical PFU to be limited to a relatively small amount of weight memory, but have the ability to access many more weights by either accessing a large external memory pool or by distributing the convolution across multiple core computation elements using a convolution transform.
[0080] Additional configuration of configurable CNN processors 4 is a block diagram illustrating a configurable CNN processor 400 embodied as a programmable function array (PFA) including four PFUs 402, according to some aspects of the present disclosure. This configurable CNN processor 400 embodied as a PFA can be viewed as a hierarchical collection of the PFUs described above. Similarly, multiple PFAs can be staged in parallel to form an overall configurable CNN processor or PFA processor. The interconnectivity between the PFUs can be controlled by an interconnect module 404, which can be programmed at compile time as described by a CNN dataflow graph.
[0081] What this disclosure presents as a configurable CNN processor deviates from the traditional approach of processor design, where instructions are compiled from a programming language, stored in the processor, executed at run time, and data flow throughout the processor is controlled at run time. Traditional instruction set architectures also allow the programmer to interface with external input / output (IO) to communicate with the rest of the world, thereby fetching data and transferring processed output data. Instruction set architectures allow hardware abstraction, enabling complex software development, including high-level language programming and compilation. This is easily possible in general-purpose processors, where instruction set architectures offer great flexibility.
[0082] On the other hand, many power optimizations are possible if we assume that the processor is dedicated to a specific set of tasks, limiting the requirements for run-time control flow mechanisms that allow flexibility and instruction set abstraction. Such limitations in the architecture may be possible if the application is sufficiently constrained. In this case, the application of a configurable CNN processor may be limited to CNN-centric operations. Based on this assumption, the present disclosure may assume that data flow control is statically assigned at compile time, and configuration of memory and core computation elements based on the data flow graph of the CNN is sufficient to control the data flow. Thus, at run-time, the only activity that may require action is computation on data based on input specifications of preselected computation rates and / or data rates.
[0083] In one embodiment, for a configurable CNN processor, which is a dedicated CNN processor and is also referred to as a PFA processor, the present disclosure may assume that the purpose of the processor is to process a data flow graph similar to that represented by a CNN or a variant based on a convolutional transform. The present disclosure may include, for example, compiler software dedicated to the configurable CNN processor, which analyzes the data flow graph of a preselected CNN, optimizes it, and then maps the functionality of the graph representing the CNN to the configurable CNN processor. The mapping of the CNN graph may be done by programming the interconnectivity of the core computation elements and the intelligent buffers and their hierarchy, as in process 200 of FIG. 2. The programming of the configurable CNN processor may include the following:
[0084] (1) Programming of the core computational elements, their operating modes, and all configurations that are statically defined at compile time.
[0085] (2) Programming of intelligent memory buffers (which may include programming the configuration of all write and read ports, including assigning which core computational elements are connected / coupled to which read and / or write ports).
[0086] (3) Data flow and connectivity can be programmed at each PFU level, and possibly at the PFA level, across other parallel PFA units. In one embodiment, all interconnect configurations are determined at compile time and are static at run time (e.g., do not change over time during computation). The CNN data flow graph can also be mapped to multiple PFA units or multiple chips (e.g., PFUs or PFAs) that communicate via parallel-serial and serial-parallel interfaces. In that case, each chip can be programmed independently. The latency of inter-chip communication can be pre-determined at compile time based on the maximum latency introduced by the parallel-serial-parallel interface. In one embodiment, the PFA 400 is implemented using a single chip.
[0087] FIG. 5 is a block diagram illustrating a configurable CNN processor embodied as a system 500 including multiple PFAs 501 in a cascaded configuration according to some embodiments of the disclosure. FIG. 5 illustrates how multiple PFAs 501 can be connected in series. In this example, each of the PFAs 501 implements four PFUs 502. Also, in this example, a single SPI in and SPI out is included in each PFA 501. In one embodiment, multiple SPI in and SPI out ports can be used. The ability to cascade multiple PFAs allows users to implement deep CNNs that would not be possible on a single chip, or implement multiple CNNs in parallel that would not be possible on a single chip.
[0088] Components of a configurable CNN processor FIG. 6 is a block diagram illustrating an example active memory buffer 600 for use in a configurable CNN processor according to some aspects of the disclosure. The main IOs are a write port 602 and a read port 604. The other IO interface is a register module interface 606, which is responsible for configuring the intelligent memory buffer 600. Each read / write port (604, 602) is supported by a small first-in, first-out data buffer (FIFO) (608, 610), allowing efficient and flexible memory operations. Similarly, each core computation element can include FIFOs at the input and output, making the overall data flow between the memory and the various core computation elements very flexible.
[0089] The read ports 604 are controlled by a number of parallel read port controllers 612. Each read port controller 612 can be individually programmed to indicate which output the read port controls. Each read port controller 612 is responsible for driving data from memory 614 through a selected read port 604 to a particular core computing element (not shown). Each of these controllers 612 can be used in a round-robin fashion for each of the read ports 604. This allows the compiler to overload the read ports 604 to drive multiple core computing elements or select a single read port 604 to drive a single core computing element based on the requirements of the preselected CNN being implemented. This provides flexibility in how to configure and / or connect and optimize the intelligent memory buffers and core computing elements based on the data rate requirements.
[0090] Each of the input write ports 602 is coupled to and includes a FIFO 608. The input FIFO 608 can be addressed in a round-robin manner. Having FIFOs (608, 610) at both the write port 602 and the read port 604 of the active memory buffer 600, and having FIFOs at the input and output of the core computational elements, allows the use of a true asynchronous bus architecture. This may be particularly useful at the top level of a chip, where connecting multiple PFUs together to form a single PFA (e.g., one chip) is a challenge, especially from a timing closure perspective. In one aspect, multiple PFU modules can be aggregated together to form a PFA (e.g., a chip), which may be an embodiment of a configurable CNN processor. The PFA or PFA module represents a top view of the chip. Relaxing timing requirements at the top level of the chip is particularly useful, as it may save power, especially in the clock tree, in an attempt to deliver an edge-aligned clock to all leaf nodes.
[0091] Clock distribution within a chip can be very challenging, especially at the top level of the chip where the clock tree branches must ensure that all leaf nodes maintain clock edge synchronization across the chip. The ability to run different modules asynchronously from one another, for example the intelligent memory buffers 600 and the core computational elements running in asynchronous clock domains at the same clock frequency, relaxes the constraints of the clock tree. As a result, many clock buffers that are typically added to synchronous circuits become redundant. The clock tree of a consumer electronic device can consume an average of 60% of the power of the device. Being able to reduce this power is significant. Since multiple blocks can run asynchronously from one another at the same clock frequency, it relieves a large number of clock tree buffers that would otherwise be used to edge align the clocks across the clock tree. There can also be implementations where the different blocks are all on synchronous clock domains.
[0092] The FIFO requirements (eg, size) on both the read and write ports may be shallow and are a function of the expected or defined data rates of the write and read ports, respectively.
[0093] The contiguous memory 614 may be a single or dual port memory, or multiple ports. The selection of the number of native ports of the contiguous memory 614 depends on the maximum data rate to be processed under full capacity. In reality, power consumption may increase exponentially with an increase in multiple native ports, so keeping the number of ports low may be ideal from a power perspective. However, the design goal of maximum data rate may, at least in some embodiments, drive the selection of a dual port memory, preferably with no more than two native ports. The memory 614 may be physically organized in a manner that best suits the layout. The physical boundaries of the memory may be either the address space or the data width of the memory, as assigned by the physical memory design compiler.
[0094] The intelligent memory buffer 600 is not limited to implementing a single CNN. In one embodiment, multiple CNNs can be implemented simultaneously as long as they have a common data flow graph. For example, if there are two CNNs implemented simultaneously, the CNN graph of one can be a subset of the other CNN.
[0095] Finally, the controller 616 may be responsible for synchronizing all control signals for the appropriate data flow selected by the configuration registers 606 .
[0096] As mentioned above, the use of FIFOs (608, 610) allows the data flow to be flexible. More specifically, the FIFOs used can be asynchronous FIFOs. As a result, the core computational elements and the intelligent memory buffer 600 can effectively run in different clock domains. The data flow in the configurable CNN processor can be controlled by the intelligent memory buffer 600. The intelligent memory buffer 600 supports various read and write ports that operate simultaneously at different data rates and have bursts of traffic that are completely asynchronous to each other. If this were controlled by an instruction set architecture, the synchronization between the various ports and the data transfer between the various write and read ports would require more logic and therefore consume more power. In the design presented here (e.g., FIG. 6), the FIFOs of the write and read ports are designed to be shallow in depth. This FIFO structure allows back pressure on the data generator. Thereby, the intelligent memory buffer / design can handle burst data flows and backpressure the data generators, resulting in an architecture where the exact flow of data is not predetermined and elasticity is provided in the data flow link. It is also not essential that the intelligent memory buffer and the core computational elements operate on the same frequency clock, but they must be asynchronous to each other. In fact, depending on the implementation, it is also possible to adjust the operating frequency of the various modules to lower the overall power consumption.
[0097] In one aspect, an intelligent memory buffer can be configured to support data having different / multiple data widths (e.g., different size widths) that can be selected at compile time, such as 2, 4, 8 or 16 bit operations. This allows power savings by reducing data width processing when full width data processing is not required. As a result, reads and writes can be performed using only the compile time selected bit width. The power savings from such memory operations can be significant.
[0098] FIG. 7 is a perspective view illustrating an example memory configuration 700 for an active memory buffer according to some aspects of the disclosure. FIG. 7 illustrates various modes of transmitting data from the active memory buffer to the core computation element. The core computation element operates on chunks of data blocks provided by the intelligent memory buffer. Depending on the type of convolution, the intelligent memory buffer can provide data to the core computation element in three different modes (702, 704, 706). The mode value itself can be embedded in the transmission protocol. While computing a convolution, there may be duplicated data requirements by the core computation module. For example, in one aspect, while computing a 3×3×N convolution, the new data block is only 1×3×N dimensions, and the remaining part is reused from the previous convolution. In one aspect, computing a 1×1 convolution may require a mode 1 block to be sent every time since there are no duplicated data points. In one aspect, mode 3 blocks can also be used when computing a convolution as an edge in the input dimension. Mode 2 blocks can be used when computing a 3×3 convolution with stride 2. The use of these different modes can prevent overlapping memory read operations and save power.
[0099] FIG. 8 is a timing diagram illustrating an example protocol 800 for transmitting data from an active memory buffer to a core computing element according to some aspects of the disclosure. Block information (e.g., Block-Info) can make each transmitted packet self-contained. The block information also labels the destination core computing element of the data packet. The address of the core computing element (e.g., "Address of 36-M", where "36-M" can refer to the core computing element) is part of the block information. The protocol also allows data to be transmitted from one read port of the active memory buffer to one or more, or even all, core computing elements. The block information also includes information about the row, column, and depth dimensions of the input data volume. This allows the intelligent memory buffer to transmit only the region to be processed.
[0100] 9 is a timing diagram illustrating an example protocol 900 for receiving data in an active memory buffer from a core computational element in accordance with some aspects of the disclosure. The example protocol 900 is similar to the example protocol 800 of FIG. 8. In one aspect, data written to the intelligent memory buffer can be assumed to be written in a raster scan fashion, with depth being the first dimension written, followed by columns, then rows.
[0101] FIG. 10 is a block diagram illustrating an exemplary core computation element 1000 for use in a configurable CNN processor according to some aspects of the disclosure. The core computation element 1000 has elastic FIFO buffers at both the input (1002-1, 1002-2, collectively referred to as 1002) and output (1004). These FIFOs (1002, 1004) can enable asynchronous data transfer between the active memory buffers and the core computation element. For this reason, active memory buffers can be implemented that operate at different clock speeds compared to the clock speed of the core computation element. This is practical because the core computation element 1000 can operate at a much higher clock speed compared to an intelligent memory buffer that may be limited by the speed of its internal memory. Asynchronous connections are also particularly attractive at the top level where timing can be difficult to meet, for example, by attempting edge alignment of all clock leaf nodes. Relaxed timing requirements facilitate top-level layout of the chip and reduce power by eliminating the need for excessive buffers to align clock edges at all leaf nodes.
[0102] In one aspect, the core computation elements can be configured to support computation data widths of multiple sizes, where the data widths can be selected at compile time and can include, for example, data widths corresponding to 2, 4, 8 or 16 bit operations. This feature can potentially save power by using reduced width computations when full width computations are not required.
[0103] The input FIFO 1002 can act as a ping-pong buffer, allowing one buffer (1002-1) to be written to by the active memory buffer while the core computational elements can use the other buffer (1002-2) to perform work, thereby allowing pipeline operation and eliminating wait times. The input buffer 1002-1 from the intelligent memory buffer provides input data to a normalization module 1006 based on a fixed mean and variance. In one aspect, the module 1006 can manipulate the data by subtracting all data points by the mean and multiplying by the inverse of the variance. The mean and variance values are programmable at compile time.
[0104] The output of the normalization module 1006 is fed to an array of parallel multiplication-add units 1008 that perform the convolution, followed by a combiner 1010 of the results 1010, and an integrator and local response normalization module 1012. Each of these modules is configurable at compile time. The output is then synchronized in a FIFO 1014 with input data from nearby core computation modules, which are synchronized by a local input FIFO 1002-2. The output of these two FIFOs (1002-2, 1014) is arithmetically combined 1016, and a next module 1018 calculates the batch normalization and activation function. The activation function can be calculated using a look-up table (LUT), which provides flexibility in implementing possible activation functions. This module 1018 can also output the calculated data to nearby core computation elements using local routing. This output data is buffered by the output FIFO 1004 before sending it to an intelligent memory buffer. In one aspect, each core computational element can be configured to execute a pre-selected CNN function for both inference and training.
[0105] FIG. 11 is a block diagram illustrating an example control unit 1100 for use in a core computational element according to some aspects of the disclosure. The control unit 1100 of the core computational element can be implemented as a hierarchically distributed microprogrammed control unit or can be implemented as a hardwired control unit. FIG. 11 illustrates a control unit implemented as a hierarchically distributed microprogrammed control unit. Input timing data controls the addressing of various memories that contain control words. These control words are responsible for controlling signals that are responsible for the data flow throughout the core computational element. In one aspect, a hardwired implementation of the control unit may be optimal in terms of power consumption. At the same time, it may be very difficult to implement.
[0106] The control unit 1100 may be responsible for controlling the data flow within the core computational elements and ensuring the correct operation of the core computational elements / modules. In the control unit 1100, the control words may be categorized based on the mode of operation. Based on the mode of operation, the appropriate control work is selected. The control word memories including 1102, 1104, 1106, 1108, 1110 may have a shallow depth. The arithmetic and coefficient control memory (CM) 1104 may store separate control words that control the overall operation of the core computational elements. The interconnect CM 1106 may be responsible for storing unique control words that determine the interconnections within the core computational elements. The data prefetch control memory 1110 may store control bits for fetching weights from outside the core computational elements. The filter mode CM 1108 may be responsible for storing unique control bits that control the flow of filter coefficients from the coefficient memory to the actual computational locations. The operations in the core computational elements may be cyclical in nature. As a result, the total number of unique control words required may be small in nature and therefore shallow in depth. Implementation of the core computational element is possible where the microprogrammed control unit 1100 is replaced by a hardwired control unit, without changing the operation of the overall processor.
[0107] The control unit 1100 is also responsible for fetching weights from the weight memory. The control unit 1100 can address weights requested beyond the physical limits of the local weight memory 1112 (e.g., about 6-8 megabits) by fetching those weights from an external pool of memory. This is called the virtual expandable memory 1114. The data prefetch unit 1116 can read data from the external pool of memory under the assumption that only one or two core computing elements may require access to the external pool of memory. Too many requests for memory access from a large number of core computing elements may result in a data throughput bottleneck. In an aspect, only a small number of core computing elements that run a fully connected (FC) layer of a CNN may require access to this external pool of memory. This is because the FC layer contains many weights compared to the convolutional layers. The data rate requirements at the FC layer are much lower compared to the data rate requirements at the early convolutional layers. This allows multiple core computing elements to utilize this external pool of memory as a shared resource. If too many core computing elements start accessing this shared memory resource at the same time, the bandwidth will be insufficient. In one aspect, it can be assumed that only a handful of core computing modules that run the FC layer need access to this shared resource. In one aspect, an external pool of memory can be located on-chip (e.g., in memory 404 of the PFA chip 400 of FIG. 4). In one aspect, an external pool of memory can be located off-chip.
[0108] In one aspect, the present disclosure includes the use of a compiler to map a CNN (e.g., a CNN architecture) on a configurable CNN processor. The compiler can implement an algorithm for routing or mapping the CNN. One such algorithm includes the following: (1) Input the CNN architecture to be implemented. (2) Each convolution operation of the CNN is assigned to a core computing element. (3) Evaluate the time including the net computation time of each convolution module by each core computation element assigned to the worst condition. (4) Allocate a computational time budget to each core computation module based on the requirement to process a particular frame per second. (5) For each core computing element that can be fully computed within the time budget, evaluate whether it is possible to compute two CNN operations on a single core computing module. The required overall coefficient can be taken into account when combining the computations of the two CNNs into a single core computing element. (6) For each core computation element that exceeds its available time budget, split the convolution between two core computation elements such that each core computation element computes only half of the required output volume. This step is repeated until each core computation element can compute its assigned tasks individually within its time budget. (7) For convolution operations larger than 3 × 3, the CNN operation can be assigned to multiple core computing elements in step (2). In this case, in steps (3) to (6), a group of core computing elements representing the CNN operation is considered. (8) Input data is loaded into the memory of the intelligent memory buffer, and output is read out from the intelligent memory buffer. The entire memory space of the intelligent memory buffer is accessible from an IO device that is responsible for communication with the outside of the processor.
[0109] The above algorithm describes one way for a compiler to route or map preselected CNNs to configurable CNN processors as described herein. In an aspect, this algorithm can be modified to meet other design goals.
[0110] CNN calculation 12 is a diagram illustrating an example CNN 1200 according to some aspects of the present disclosure. The CNN 1200 is a general CNN. This specific example shows the flow of data and computation along with various computational nodes such as convolution, ReLu, pooling, fully connected layers, and softmax layers. The computational nodes and their associated memory requirements are subject to the data flow graph of the CNN.
[0111] 13 is a block diagram illustrating a convolution operation 1300 of the example CNN 1200 of FIG. 12 according to some aspects of the disclosure. Most of the core computations of a CNN are convolution operations. Similarly, most of the core computations during backpropagation or training of a CNN are also convolution operations.
[0112] 14 is a block diagram illustrating a forward pass 1400 and a backpropagation pass 1420 of the example CNN of FIG. 12, according to some aspects of the disclosure. In the forward pass 1400, X denotes the input to the convolution, F denotes the filter weight, and O denotes the output. This is the forward pass or inference pass of the CNN.
[0113] The computational path during backpropagation is shown at 1420. The equation shows that the backpropagation path during training of a CNN is reduced to convolution operations similar to the convolution operations in the inference path. These convolution operations in 1420 can be performed by the configurable CNN processor, similar to the convolutions being performed in the inference path shown at 1400. This allows the same architecture of the configurable CNN processor to be used for both inference and training operations.
[0114] Backpropagation path 1420 illustrates some aspects of CNN training. During CNN training, error derivatives from the last stage of the CNN are backpropagated to the first stage of the CNN in the reverse direction of inference. The main purpose of the backpropagation algorithm is to compute the error gradient output at each stage and update the weights based on the error gradient propagated to each weight. It can be seen that the computation of the gradients flowing from one stage to the other and the gradients of each weight can be approximated by a convolution operation. Backpropagation path 1420 describes this graphically.
[0115] This means that every computational node that computes an inference path can also compute the gradient flow for backpropagation that can be used to train the CNN. Training also involves the selection of the correct loss function and a mechanism for updating weights based on filter gradients. The configurable CNN processor described herein is intended for and capable of both inference and training. The only difference is that during training, more memory may be required to store the results of intermediate stages from inference than is used during backpropagation.
[0116] Configurable CNN Processor Mapping Example Figure 15 is a block diagram illustrating three example transformations for mapping a portion of a CNN to a core computation element according to some aspects of the disclosure. Figure 15 illustrates three different types of transformations (e.g., case 1, case 2, case 3) that may be used during the mapping of a CNN data flow graph to a configurable CNN processor described herein. In Figure 15, it is assumed that the core computation element computes all the necessary computations of the CNN, that the correct data is passed to it, and that the appropriate output data is correctly collected therefrom.
[0117] Case 1 transformation can be used when a single core computing element cannot meet the required computation time metric. In such cases, the convolution operation can be split into two parallel core computing elements to run in parallel and generate the required output volume. This scheme uses twice as many computation units in the form of two core computing elements and can generate the output volume in half the time of the untransformed model computed on a single core computing element. Also, in terms of memory resource utilization, it may require twice as many read ports and twice as many write ports. The total physical memory usage remains the same before and after the transformation.
[0118] The following transformation for Case 2 involves twice as many core computation elements and memory read port resources. However, Case 2 only requires one time more memory write port resources and an internal communication channel between the core computation elements. Each core computation element performs computations at half the depth of the input and uses internal communication resources between the two core computation elements. The computed outputs from the two core computation elements need to be put together to compose the final output volume. This can be done in the receiving core computation element. One of the write ports is supplemented by the internal communication between the two core computation elements. This transformation can be very useful when additional write ports are not available.
[0119] The final case 3 transformation uses a group of core computation elements to perform convolutions with filter dimensions larger than 3×3. This example shows a convolution with a filter of 9×9 dimensions. Most CNNs use 3×3 or at most 5×5, and few use 7×7 convolutions, let alone 9×9. The 9×9 convolution is chosen as an example for case 3 because it automatically covers potential convolutions of lower dimensions. In this example, the 9×9 convolution is performed on a grid of 9 core computation elements. Overall, it uses one read port and one write port for memory resources, and the remaining communication is done through inter-core computation communication links (e.g., a coupling fabric).
[0120] In all three cases above, data to any core compute element can be driven either by a dedicated memory read port (e.g., the memory read port of an intelligent / active memory buffer) or by multiple core compute elements sharing a single memory read port resource.
[0121] 16 is a block diagram illustrating a possible mapping of the exemplary CNN of FIG. 12 to core computation elements using multiple line buffers, according to some aspects of the disclosure. FIG. 16 is an example of a CNN introduced above, where convolution operations are distributed across multiple core computation elements to compute a hypothetical number of frames per second (e.g., a preselected processing requirement). The number of frames processed per second determines the required transformations (as described above) at each CNN stage to meet the target data throughput. This in turn determines the number of dedicated core computation modules at each of the CNN stages.
[0122] FIG. 16 shows that a line buffer is required before every core computation module, and thus the total number of line buffer modules that may be involved. Each line buffer contains 3 lines of data with a depth. To realize a filter with dimensions of N×N, N line buffers with that depth may be required to support the data requirements of each core computation element. Here, since the filter has dimensions of 3×3, the line buffers of each stage store 3 lines of data with a depth. The interconnection between the core computation modules and the line buffers varies from CNN to CNN based on the connection graph that defines the CNN to be implemented. One idea behind the configurable CNN processor described herein is to facilitate this connection so that various CNN graphs can be realized by rearranging the connections between the line buffers and the computation modules. Essentially, this allows the function graph of the CNN to be directly programmed or mapped onto the processor.
[0123] 17 and 18 show a single block diagram of possible mappings (1700-1, 1700-2, collectively referred to as 1700) of the exemplary CNN of FIG. 12 to core computation elements (e.g., “36-M”) in accordance with some aspects of the disclosure, where line buffers are aggregated into an active memory buffer. In FIG. 17 and FIG. 18, multiple line buffers are aggregated and placed into a unit (1702-1, 1702-2, 1702-3, collectively referred to as 1702) called an intelligent memory buffer (e.g., an intelligent memory buffer described herein). The intelligent memory buffer 1702 can be configured to have a contiguous memory that can accommodate a predetermined number of line buffers along with their depth based on the configuration of the line buffers. In one aspect, the intelligent memory buffer 1702 can be assumed to have a predetermined number of write ports and a predetermined number of read ports.
[0124] Under certain conditions it is appropriate to assume that: (1) Given the technology node of the processor implementation, the processor may operate at a speed that is an order of magnitude faster than the computed input data rate. As an example, real-time motion may have a frame rate of 30 frames per second, where a 400x400x3 sized image has a data rate of about 14.5 megapixels per second, and compared to the configurable CNN processor described herein operating at 1 GHz, the order of difference in speed is about 70 times (e.g., the configurable CNN processor is operating at 70 times the data rate of the real-time motion data source). This data rate difference between the computation engine and the target data processing rate can be easily extended to all stages of the CNN with the help of the convolution transform mentioned above. In that case, all stages will end up with their respective target data processing rates and the processing rates of the hardware computation elements, such as intelligent memory buffers and core computation elements. As a result, in each stage of the CNN, the memory and core computation elements can be configured to operate at a speed much faster than the target processing rate. (2) Under the above assumptions, it would be reasonable to conclude that if the operating speed of each intelligent memory buffer and core computing element is faster than the target processing rate, the intelligent memory buffer can easily perform multitasking. In the case of the intelligent memory buffer, the internal memory in which data is stored can easily perform multitasking to enable multiple core computing elements having data read and write requirements through multiple read and write ports. One example is when the core memory of the intelligent memory buffer is a dual-ported continuous memory, and the intelligent memory buffer supports eight read ports and eight write ports simultaneously. In other words, in this example, at the average and maximum throughput capacity, the intelligent frame buffer can enable each of the read and write ports every eight clocks. (3) Each of the core computation elements can be configured to use more than 8 clocks to compute the assigned task. In one aspect, this can increase by orders of magnitude when there are several filters computing in parallel. This is ideal for the intelligent memory buffer because it can multitask between different core computation elements without bottlenecks in feeding data to the core computation elements. In one aspect, this ability of time multiplexing allows the intelligent memory buffer to provide multiple read and write ports and maintain data consistency between multiple core computation elements while operating under the constraints of low power implementation. This strategy allows optimal reading of data for convolution and avoids all the extra read operations that would be required in the case of a cache-based memory hierarchy system. (4) In modern technology implementations, memory operations such as reads and writes can consume much more power than simple arithmetic operations such as addition, subtraction, and multiplication. Therefore, one useful strategy leveraged here is to minimize memory read / write operations and maximize the total number of calculations per clock. In one aspect, an intelligent memory buffer is responsible for supplying data to each core computation element, which then uses a few clocks to consume the data and produce a meaningful result. By encapsulating all memory read / write operations within an intelligent memory buffer and performing optimal read and write operations, the configurable CNN processor can minimize memory read / write power consumption. In a convolution operation, data is processed in chunks that reflect the size of the convolution. For example, in one embodiment, a 3x3x16 convolution with 128 parallel filters in a CNN stage would require a 3x3x16 chunk of data for the core computation element to compute, and after computing the 128 data points corresponding to the 128 parallel filters (e.g., one for each parallel filter), it would need to use the next chunk of 3x3x16 data to generate the next set of 128 output points. If the convolution were a 1x1 convolution, each set of 3x3x16 data points would be unique. However, in this case, because of the 3x3 filters, this would result in overlapping data points between subsequent 3x3x16 blocks of data. Figure 7 illustrates the various modes that are supported. This can prevent repeated data read operations. However, in this example, there is an overlap of 2x3x16, and only 1x3x16 new data points (e.g., mode 3 in Figure 7) need to be read from the intelligent memory buffer. However, if the size of the filter is 1x1 instead of 3x3, this example would be similar to mode 1 in Figure 7. This ensures optimal memory read operation and can guarantee optimal read power. (5) In one aspect, to perform a convolution at any point in time, only as many rows of data as the dimensions of the filter may be required to begin computation on an input frame. For example, a 3x3 convolution only requires storing 3 lines with depth data points at any point in time, which are overwritten by the next input row data, which is overwritten by the next input row data. The contiguous memory of the intelligent memory buffer allows for optimizing the use of the total number of line buffers that need to be stored at any point in time, while providing a shared resource among many core computation elements through read and write ports. At the same time, this also provides the option to store the entire frame data within the memory module. This can be used for debugging or for CNN networks that include intermediate storage of the entire frame to be used later. This provides flexibility to the intelligent memory buffer to adapt to the dimensions of the data required at any CNN stage, of course within the scope of the entire memory. For example, at compile time, the compiler can determine the number of CNN convolutions that can be supported by a single intelligent memory buffer based on the size of the total memory available in the intelligent memory buffer. This decision is also influenced by the required data processing rate. (6) In one aspect, an intelligent memory buffer can be considered as a core component of a configurable CNN processor, which is responsible for providing data to the core computation elements and writing the computation results back from the core computation elements to memory for the next convolution module. (7) In one embodiment, there are multiple core computing elements per read port of the intelligent memory buffer, and each of the core computing elements can only access a set of write ports of the intelligent memory buffer. The connection between the intelligent memory buffer and the core computing elements is determined based on the data flow graph of the CNN being implemented. This can be determined at compile time, thereby eliminating the need to dynamically change this connection between modules during the execution of a given CNN. This fixed connection significantly reduces power consumption that would otherwise be consumed by constantly switching connections and by mechanisms that store instructions that change connections at run time, which is typical of conventional processors that use instruction set architectures.
[0125] FIG. 19 is a block diagram illustrating a first example CNN (Case 1) mapped to a configurable CNN processor according to some aspects of the disclosure.
[0126] FIG. 20 is a block diagram showing the resulting mapping of a configurable CNN processor (case 1) using the first exemplary CNN of FIG. 19 according to some aspects of the disclosure. In one aspect, FIG. 20 can be seen as an example of mapping an exemplary CNN data flow graph using the convolution transformation case 1. The examples of FIG. 19 and FIG. 20 are intended to highlight the use of the transformation shown in FIG. 15 case 1. FIG. 20 shows that in stage 2, the CNN of FIG. 19 is split into 10 core computing elements to meet a certain hypothetical data rate. In stage 3 of FIG. 20, the core computing elements are split into two parts, each computing 32 parallel filters (e.g., computed across 5 core computing modules, for a total of 64 total output channels).
[0127] FIG. 21 is a block diagram illustrating a second example CNN (Case 2) mapped to a configurable CNN processor according to some aspects of the disclosure.
[0128] FIG. 22 is a block diagram illustrating the resulting mapping of a configurable CNN processor (case 2) using the second exemplary CNN of FIG. 21 according to some aspects of the present disclosure. FIG. 22 can be seen as a mapping of an exemplary CNN data flow graph using the convolution transformation case 2. The examples of FIG. 19 and FIG. 20 are intended to illustrate the transformation of case 1, the examples of FIG. 21 and FIG. 22 are intended to illustrate the transformation of case 2, and the examples of FIG. 23 and FIG. 24 are intended to illustrate the transformation of case 3. The stage 2 of the CNN shown in FIG. 22 illustrates the transformation of case 2 shown in FIG. 15. The difference between the two transformations can be clearly seen in FIG. 20 and FIG. 22. More specifically, the stage 2 of FIG. 20 uses an additional write port of the intelligent memory buffer, while the implementation of FIG. 22 utilizes more communication resources between the core computing modules.
[0129] FIG. 23 is a block diagram illustrating a third example CNN (Case 3) mapped to a configurable CNN processor according to some aspects of the present disclosure.
[0130] FIG. 24 is a block diagram illustrating the resulting mapping of a configurable CNN processor (case 3) using the third exemplary CNN of FIG. 23 according to some aspects of the present disclosure. FIG. 24 can be seen as an example of mapping an exemplary CNN data flow graph using the convolution transform case 3. Stage 3 of FIG. 24 illustrates the use of the transform shown in case 3 of FIG. 15. Stage 3 uses a 5×5 convolution. The 5×5 convolution is distributed to a 2×2 array of core computation elements. Essentially, the hardware is implementing a 6×6 convolution. Higher orders can always implement lower order filters with zero insertion. Stage 3 of FIG. 24 implements the transform shown in case 3, but also combines it with the transform shown in case 2.
[0131] Use cases incorporating configurable CNN processors FIG. 25 is a block diagram illustrating a first use case 2500 of a configurable CNN processor in a MIPI application 2501 according to some aspects of the disclosure. MIPI or Mobile Industry Processor Interface is a technology specification for the mobile ecosystem, particularly smartphones, but also other mobile industries. Camera Serial Interface (CSI) is a specification of the Mobile Industry Processor Interface (MIPI) Alliance. It defines the interface between a camera and a host processor. Aspects of MIPI are incorporated into various components of FIG. 25.
[0132] This disclosure generally describes a system capable of processing data and generating analytics. One exemplary application is processing image / video data. The analytics can be in the form of tasks such as object detection / recognition from a scene, image enhancement from low light conditions, or any form of intelligent task intended to be computed either frame by frame or on a group of frames defined as a video sequence. Recognition of a video sequence can include temporal dependencies such as action recognition.
[0133] FIG. 25 illustrates such a CNN processor configured for MIPI 2501 that inputs image sensor data 2504, processes it in a programmable function array (PFA) 2502 (e.g., after receiving it via MIPI D-PHY and MIPI CSI-Rx), and has the option of (1) sending the calculated analysis to an application processor 2506 via a standard communication bus such as SPI, UART, I2C, or another such interface, or (2) directly incorporating the calculated data on a MIPI-CSI output bus (e.g., into a packet sent via MIPI CSI-Tx and MIPI D-PHY at output). MIPI D-PHY is a physical layer component used primarily to interconnect cameras and displays to application processors and is defined by the MIPI Alliance. MIPI CSI (including the MIPI CSI-Rx or receive component and the MIPI CSI-Tx or transmit component) is a camera serial interface used primarily to interconnect cameras in a device to application processors or image signal processors and is defined by the MIPI Alliance.
[0134] The processed analytics of the PFA / CNN sub-processor 2502 can be provided in two forms. In one form, the output analytics can be defined by a small number of data words, such as classification results, which can then be sent to the application processor 2506 via a standard serial communication bus (SPI, UART, I2C), including the I2C bus as part of the MIPI standard. In another form, the processed output can consist of a larger amount of output data sent over the MIPI-CSI bus (e.g., main data bus). In this case, the PFA / CNN sub-processor 2502 can embed the analytics directly onto the MIPI-CSI data, and the application processor 2506 extracts the analytics from the MIPI-CSI bus. This results in a highly optimized system for transmitting data between the CNN processor 2501 and the application processor 2506. By eliminating the need for the application processor 2506 to transfer data specifically to the CNN processor 2501, the overall system power can be minimized. This can further reduce the overall system latency. In sleep mode, the default data flow path is from input to output of the MIPI-CSI bus, bypassing the PFA / CNN sub-processor 2502. This ensures that power for the CNN processor 2501 is consumed only, or primarily, when the PFA / CNN sub-processor 2502 is used for computation. In one embodiment, the MIPI bus can be implemented using a flexible cable. In such a case, the CNN processor 2501 can be placed in series along the bus and along the cable. In one embodiment, the CNN sub-processor 2502 can be implemented using any of the PFAs described herein. In one embodiment, the CNN sub-processor 2502 can be implemented using a conventional instruction set architecture processor (e.g., a load / store processor) as described above.
[0135] In one aspect, the CNN sub-processor 2502 can receive image data from an image camera sensor 2504 via MIPI. The CNN sub-processor 2502 can then generate processed data based on the image data. The processed data can be in the form of analytics or other statistics. The CNN sub-processor 2502 can then provide the processed data to an application processor (e.g., on a MIPI bus or on a SPI / I2C / UART bus).
[0136] FIG. 26 is a block diagram illustrating a second use case 2600 of configurable CNN processors (2601(1)-2601(N), collectively referred to as 2601) in a MIPI application, according to some aspects of the disclosure. FIG. 26 illustrates an implementation in which multiple configurable CNN processors 2601 are serially cascaded on a MIPI bus between an image camera sensor 2604 and an application processor 2606. This implementation provides flexibility to compute larger image analysis functions that are difficult or impossible to compute using a single CNN processor (e.g., as seen in FIG. 5). In one aspect, the second use case 2600 operates substantially the same as the first use case 2500, except that it includes multiple CNN processors 2601, each including a PFA / CNN sub-processor 2602. In another aspect, multiple serially coupled CNN processors can implement a unique application in each of the CNN processors of 2601. In this use case, multiple CNNs can be implemented in cascade with minimal latency between the start of each CNN computation, since there is little delay as the data flows through each of the CNN processors and the input data arrives at the CNN processors over a MIPI bus.
[0137] Each of the CNN processors 2601 sits on a MIPI bus and has a pass-through of the MIPI bus from input to output. Each reads data from the MIPI bus and causes or enables the flow of MIPI data from input to output with minimal latency between the arrival of the input and the validity of the output. This allows downstream CNN processors 2601(x-N) to begin processing on the input image data with no latency compared to the first CNN processor 2601(1) from the input compared to a system in which the application processor sent data to each of the CNN coprocessors via direct memory transfer (DMA). In such a system, it would be necessary to have multiple DMA channels in parallel, which could be costly in terms of power and area. An alternative would be to use a single channel DMA and serially transfer the data to each coprocessor, but this would be a time-consuming process and would result in significant latency between the start time of one CNN coprocessor and the start time of another coprocessor.
[0138] 27 is a block diagram illustrating a third use case 2700 of a configurable CNN processor 2701 in a MIPI application, according to some aspects of the disclosure. Figure 27 illustrates how a MIPI bus starting at a MIPI source 2704 can bypass the PFA (e.g., configurable CNN sub-processor) 2702 and send data directly to the application processor via a MIPI sink 2706, while the configurable CNN sub-processor 2702 processes the MIPI data in parallel. This is made possible, at least in part, by the use of a multiplexer 2708.
[0139] FIG. 28 is a block diagram illustrating a fourth use case 2800 of a configurable CNN processor 2801 in a MIPI application according to some aspects of the disclosure. FIG. 28 is a more detailed diagram illustrating the internal architecture of the configurable CNN processor 2801. The CNN processor 2801 includes a configurable PFA / CNN sub-processor 2802, a microcontroller (RISC-V as shown) 2804, a MIPI subsystem, and standard IO such as UART, GPIO, SPI, I2C, etc. All memory in the system (both the CNN sub-processor and the RISC-V microcontroller) is memory mappable and accessible by various masters driving the internal memory bus. Programming of the PFA / CNN sub-processor 2802 can be done in one of two different modes: (1) by the internal microprocessor that configures the CNN processor from SPI FLASH, or (2) by an application processor (not shown, but possibly coupled to a MIPI sink) through a standard IO interface such as SPI, I2C, UART, etc. that is a master device on the memory bus. In the second mode, the SPI FLASH can be omitted. The RISC-V internal processor 2804 is responsible for various housekeeping functions and can also be used for computations as needed. It tracks the state of the CNN sub-processors 2802 for interfacing with the outside world. Finally, the RISC-V 2804 can also flexibly handle any kind of exceptions that may occur in the system at runtime. In one aspect, the RISC-V processor can be an instruction set architecture controller covered by an open source license, allowing for easy adoption.
[0140] In one aspect, the configurable CNN processor 2801 of FIG. 28 can be considered merely as a detailed description of the previous figures with MIPI (e.g., 2701 of FIG. 27, 2601 of FIG. 26, or 2501 of FIG. 25) rather than as a different use case. The RISC-V processor is optional. In use cases without a RISC-V processor, the application processor (not shown in FIG. 28, but see 2506 of FIG. 25) can configure the configurable CNN sub-processor 2802 via the SPI / I2C / UART bus. In that case, the output of the CNN sub-processor is read by the application processor, or the CNN sub-processor can embed the output in MIPI frames and send them to the application processor. In one aspect, the use of a RISC-V processor increases the flexibility of the system. It is possible to program the PFA / CNN sub-processor 2802 directly from the SPI-FLASH at power-up without waiting for the programming of the application processor. The RISC-V processor, an open-standard RISC processor, can keep track of the state of the CNN sub-processors and can be used for computational purposes, if desired, as well as for testing the CNN processor 2801 and the entire chip.
[0141] FIG. 29 is a block diagram illustrating a fifth use case 2900 of the configurable CNN processor 2902 in a direct sensor interface application according to some aspects of the disclosure. In FIG. 29, the fifth use case uses the configurable CNN processor 2902 to process sensor data directly. The MIPI interface to the sensor, a subcomponent of the CNN processor 2902, helps to achieve that. FIG. 29 illustrates an example of a use case where the CNN processor 2902 directly interfaces with a camera sensor module to generate image / video analytics that are directly transmitted via a WiFi transmitter 2904. The computed image / video analytics (e.g., output, which may be classification data based on image data from the sensor) is significantly (e.g., orders of magnitude) smaller than the input data and is transmitted via WiFi. This significantly reduces power consumption and improves the battery life of the direct sensor interface device, which can remain usable for several months before recharging any device power source (e.g., battery). Another advantage of this unit is that the CNN processor does not need to store the entire frame to process the image, and does not need to store the actual image in a digital format. It only transmits the computed statistics over WiFi. Such devices do not record images or video on any medium, thus avoiding potential conflicts with privacy laws.
[0142] In one aspect, a device may transmit over WiFi only when processed data is relevant, and the transmission may include only the intended statistics (e.g., a small number of data words), thereby reducing the overall transmission bandwidth. This use case and / or implementation may thus enable thousands of devices to be connected over WiFi, making large-scale deployment easier or possible and can be implemented at low cost.
[0143] In one embodiment, the WiFi transmitter 2904 may be replaced by a more general purpose wireless transmitter supporting any one of the many wireless protocols available for wireless communication. In such a case, the communications described above as using WiFi may instead be performed wirelessly using any wireless protocol other than WiFi.
[0144] FIG. 30 is a flow chart illustrating a process 3000 for operating a configurable CNN processor in a MIPI application according to some aspects of the disclosure. In one aspect, any of the configurable CNN processors configured for MIPI (e.g., 2501, 2601, 2701, 2801, or 2901) can perform this process. In block 3002, the process receives image data (e.g., from the image camera sensor 2504 over MIPI in FIG. 25). In block 3004, the process generates processed data based on the image data. The processed data can be in the form of analytics or other statistics (e.g., including classification data based on the image data). In block 3006, the process provides the processed data to an application processor (e.g., on a MIPI bus or on a SPI / I2C / UART bus) or another MIPI sink.
[0145] Additional Aspects In one aspect, the configurable CNN processor described herein can provide various advantages. For example, the interface between the active memory buffer and the core computational elements can be very elastic and controlled by FIFOs. This allows each of those modules to run asynchronously with each other without affecting their operation. Each of those FIFOs can be shallow in depth, typically on the order of 8-16 words deep. As a result, each core computational element does not use large local memory other than input / output FIFOs and pipeline registers. This is because the data flow between the core computational elements and the active memory buffers can be statically defined at compile time. The ability to have various components in the processor subsystem interact asynchronously helps eliminate issues such as timing closure in chip design and helps save overall power by not requiring costly power-consuming clock buffers (e.g., ubiquitous) at the chip-top level to get close timing.
[0146] Another advantage of the configurable CNN processor described herein includes active / intelligent memory buffers. In one aspect, it has shallow depth input and output FIFOs, and the only large memory of the system is its internal memory array, which can be a single contiguous memory and can include multiple ports. In one example, the contiguous memory is a two-port contiguous memory array. Using such a large contiguous memory array in only one place helps to close timing at the chip top level and aids in the design of the entire chip.
[0147] Another advantage of the configurable CNN processor described herein includes versatility. For example, if the data flow graph of a given CNN does not fit on a single chip, the data flow graph can be split and implemented across multiple chips. Communication between multiple chips is possible by connecting the output of an active memory buffer of a first chip to the input of an active memory buffer of a second chip across chip boundaries. Elastic FIFOs present at the output and input ports of the memory buffers make the implementation of inter-chip communication very flexible and can be implemented by either serial or parallel interfaces.
[0148] In one aspect, multiple CNNs can be implemented in parallel on a configurable CNN processor as described herein. In one aspect, the implementation is not limited to the number of CNNs implemented, but rather may be limited by the total resources available to implement multiple CNNs in parallel.
[0149] In one embodiment, the input / pre-selected CNN or CNN description is provided in a high-level programming language, Python, and a compiler generates the appropriate configuration for the configurable CNN processor.
[0150] The examples described herein are provided to illustrate certain concepts of the present disclosure. Those skilled in the art will appreciate that they are merely exemplary in nature and that other examples may fall within the scope of the present disclosure and the appended claims. Based on the teachings herein, those skilled in the art will appreciate that an aspect disclosed herein can be implemented independently of any other aspect, and that two or more of the aspects can be combined in various ways. For example, an apparatus can be implemented or a method can be performed using any number of the aspects described herein. Furthermore, such an apparatus can be implemented or such a method can be performed using other structure and functionality, or using other structure and functionality in addition to or other than one or more of the aspects described herein.
[0151] Many aspects are described in terms of a sequence of operations performed by, for example, elements of a computing device. It will be appreciated that the various operations described herein can be performed by specific circuitry, such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or various other types of general-purpose or special-purpose processors or circuits, by program instructions executed by one or more processors, or by a combination of both. Moreover, those sequences of operations described herein can be considered to be fully embodied in any form of computer-readable storage medium having stored thereon a corresponding set of computer instructions that, when executed, cause an associated processor to perform the functions described herein. Thus, the various aspects of the present disclosure may be embodied in many different forms, all of which are contemplated to be within the scope of the claimed subject matter. Moreover, for each aspect described herein, the corresponding form of such an aspect may be described herein, for example, as "logic configured to" perform the described operations.
[0152] Those skilled in the art will appreciate that information and signals may be represented using any of a variety of different technologies and techniques. For example, the data, instructions, commands, information, signals, bits, symbols and chips referred to throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
[0153] Moreover, those skilled in the art will appreciate that the various exemplary logic blocks, modules, circuits, and algorithm steps described in connection with the aspects disclosed herein may be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability of hardware and software, various exemplary components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the particular application and design constraints imposed on the overall system. Those skilled in the art may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
[0154] One or more of the components, steps, features and / or functions described above may be rearranged and / or combined into a single component, step, feature or function, or embodied in multiple components, steps or functions. Also, additional elements, components, steps and / or functions may be added without departing from the novel features disclosed herein. The apparatus, devices and / or components described above may be configured to perform one or more of the methods, features or steps described herein. Also, the novel algorithms described herein may be efficiently implemented in software and / or incorporated into hardware.
[0155] It is understood that the specific order or hierarchy of steps in the disclosed methods is an example of an example process. It is understood that the specific order or hierarchy of steps in the methods can be rearranged based on design desirability. The accompanying method claims present elements of the various steps in a sample order, and are not intended to be limited to the specific order or hierarchy presented, unless specifically stated therein.
[0156] The methods, sequences or algorithms described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. An example of a storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. Alternatively, the storage medium may be integral to the processor.
[0157] The word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any aspect described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other aspects. Likewise, the term "aspects" does not require that all aspects include the discussed feature, advantage or mode of operation.
[0158] The terms used herein are for the purpose of describing particular aspects only and are not intended to limit the aspects. As used herein, the singular forms "a," "an," and "the" are intended to include the plural unless the context clearly indicates otherwise. Additionally, as used herein, the terms "comprise," "comprising," "includes," or "including" are understood to specify the presence of stated features, integers, steps, operations, elements, or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof. Additionally, the term "or" is understood to have the same meaning as the Boolean operator "OR," i.e., unless otherwise specified, it includes the possibilities of "either" and "both," and is not limited to "exclusive or" ("XOR"). Additionally, the symbol " / " between two adjacent words has the same meaning as "or" unless otherwise specified. Additionally, expressions such as "connected," "coupled," and "in communication" are not limited to a direct connection unless otherwise specified.
[0159] References herein to elements using designations such as "first," "second," etc. generally do not limit the quantity or order of those elements. Rather, those designations may be used herein as a convenient way of distinguishing between two or more elements or instances of an element. Thus, references to a first and a second element do not imply that only two elements may be used therein, or that the first element must precede the second element in any way. Also, unless otherwise specified, a set of elements may include one or more elements. Furthermore, terms of the form "at least one of a, b, or c" or "a, b, c, or any combination thereof" as used herein or in the claims may mean "a or b or c, or any combination of those elements." For example, the term may include a, or b, or c, or a and b, or a and c, or a and b and c, or 2a, or 2b, or 2c, or 2a and b, etc.
[0160] As used herein, the term "determining" encompasses a wide variety of actions. For example, "determining" can include calculating, computing, processing, deriving, investigating, searching (e.g., searching in a table, database or other data structure), ascertaining, and the like. "Determining" can also include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory), and the like. "Determining" can also include seeking, selecting, choosing, establishing, and the like.
[0161] While the above disclosure sets forth exemplary embodiments, it should be noted that various changes and modifications may be made herein without departing from the scope of the appended claims. Also, the functions, steps, or actions of the method claims according to the embodiments described herein do not have to be performed in any particular order unless specifically stated. Further, although elements may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is expressly stated.
Claims
1. 1. A configurable processor dedicated to implementing a convolutional neural network (CNN), comprising: a plurality of core computational circuit elements, each configured to perform a CNN function according to a preselected data flow graph; an active memory buffer; a plurality of connections between the active memory buffer and the plurality of core computational circuit elements, each connection being established according to the preselected data flow graph; a plurality of connections between the plurality of core computational circuit elements, each connection being established according to the preselected data flow graph; a processor that is configurable to move data between the plurality of core computing circuit elements through the active memory buffer in accordance with the preselected data flow graph;
2. 2. The configurable processor of claim 1, The configurable processor, wherein the preselected data flow graph is based on a preselected CNN.
3. 2. The configurable processor of claim 1, 11. A configurable processor comprising: a processor configured to execute a CNN function according to the preselected data flow graph without using an instruction set;
4. 2. The configurable processor of claim 1, 11. A configurable processor, wherein at least two of said plurality of core computational circuit elements are configured to operate asynchronously with respect to one another.
5. 2. The configurable processor of claim 1, 11. A configurable processor, wherein the active memory buffer and each of the plurality of core computational circuit elements are configured to operate asynchronously with respect to one another.
6. 2. The configurable processor of claim 1, 1. A configurable processor, wherein each of said plurality of core computational circuit elements is dedicated to performing a CNN function.
7. 2. The configurable processor of claim 1, 1. A configurable processor, wherein each of the plurality of core computational circuit elements is configured to perform a CNN function prior to a run time of the configurable processor.
8. 2. The configurable processor of claim 1, 1. A configurable processor, wherein each of the plurality of core computational circuit elements is configured to compute a layer of a CNN function.
9. 2. The configurable processor of claim 1, 1. A configurable processor, wherein each of the plurality of core computational circuit elements is configured to compute an entire CNN.
10. 2. The configurable processor of claim 1, 1. A configurable processor, wherein each of the plurality of core computational circuit elements is configured to perform a CNN function for both inference and training.
11. 2. The configurable processor of claim 1, 11. A configurable processor, wherein each of the plurality of core computational circuit elements comprises a memory configured to store weights used to perform a CNN function.
12. 2. The configurable processor of claim 1, a plurality of connections between the active memory buffer and the plurality of core computational circuit elements are established at compile time and fixed at run time of the configurable processor; A configurable processor, wherein a plurality of connections between the plurality of core computational circuit elements are established at the compile time and fixed at the run time.
13. 1. A processor array comprising: A plurality of configurable processors according to claim 1; an interconnect circuit; a plurality of connections between said plurality of configurable processors and / or said interconnect circuitry, each connection being established in accordance with said preselected data flow graph.
14. 1. A system comprising: a Mobile Industry Processor Interface (MIPI) source; A MIPI sink; a MIPI bus coupled between said MIPI source and said MIPI sink; 2. A system according to claim 1, further comprising: a configurable processor arranged in series along said MIPI bus such that all data on said MIPI bus passes through said configurable processor.
15. 15. The system of claim 14, a non-MIPI output interface including at least one of an SPI, an I2C interface, or a UART interface; The system, wherein the configurable processor is configured to transmit information to an external device using either the non-MIPI output interface or the MIPI bus.
16. 1. A system comprising: a sensor configured to generate sensor data; 2. The configurable processor of claim 1, wherein the configurable processor is directly coupled to the sensor and configured to generate processed data based on the sensor data; a wireless transmitter directly coupled to the configurable processor and configured to transmit at least a portion of the processed data.
17. 17. The system of claim 16, the sensor data includes image data; the processed data includes classification data generated based on the image data; The system, wherein the wireless transmitter is configured to transmit the classification data.
18. 1. A method for configuring a configurable processor dedicated to implementing a convolutional neural network (CNN), comprising: receiving a preselected data flow graph; programming each of a plurality of core computational circuit elements to perform a CNN function according to the preselected data flow graph; programming an active memory buffer in accordance with said preselected data flow graph; programming a plurality of connections between the active memory buffer and the plurality of core computational circuit elements in accordance with the preselected data flow graph; programming a plurality of connections between the plurality of core computational circuit elements in accordance with the preselected data flow graph; and programming the active memory buffer to move data between the plurality of core computing circuit elements via the memory buffer in accordance with the preselected data flow graph.
19. 20. The method of claim 18, The method, wherein each of the programming operations is performed prior to run time of the configurable processor.
20. 20. The method of claim 18, operating the plurality of core computational circuit elements to perform a CNN function without an instruction set; and operating the active memory buffer without an instruction set.
21. 20. The method of claim 18, The method, wherein the preselected data flow graph is based on a preselected CNN.
22. 20. The method of claim 18, The method, further comprising the step of operating at least two of the plurality of core computational circuit elements asynchronously with respect to one another.
23. 20. The method of claim 18, The method, further comprising operating the active memory buffer and each of the plurality of core computing circuit elements asynchronously with respect to one another.
24. 20. The method of claim 18, wherein each of the plurality of core computational circuit elements is dedicated to performing a CNN function.
25. 20. The method of claim 18, The method of claim 1, further comprising, upon execution of the configurable processor, executing a CNN function in each one of the plurality of core computational circuit elements.
26. 20. The method of claim 18, The method further comprising, upon execution of the configurable processor, computing a layer of a CNN function in a respective one of the plurality of core computational circuit elements.
27. 20. The method of claim 18, The method, further comprising, upon execution of the configurable processor, computing an entire CNN in at least one of the plurality of core computational circuit elements.
28. 20. The method of claim 18, a plurality of connections between the active memory buffer and the plurality of core computational circuit elements are programmed at compile time and fixed at run time of the configurable processor; a plurality of connections between said plurality of core computing circuit elements are programmed at said compile time and fixed at said run time.
29. 20. The method of claim 18, wherein each of the plurality of core computational circuit elements is configured to perform a CNN function for both inference and training.
30. 20. The method of claim 18, 11. The method of claim 10, wherein each of the plurality of core computational circuit elements comprises a memory configured to store weights used to perform a CNN function.
31. 1. A configurable processor dedicated to implementing a convolutional neural network (CNN), comprising: a plurality of means for executing a CNN function according to a preselected data flow graph; A means for storing data; means for establishing connections between the means for storing data and a plurality of means for performing the CNN function according to the preselected data flow graph; means for establishing connections between a plurality of means for performing the CNN function according to the preselected data flow graph; a configurable processor, the means for storing data comprising means for moving data between a plurality of means for performing the CNN function via the means for storing data in accordance with the preselected data flow graph.
Citation Information
Patent Citations
Logic inference system, computation learning apparatus, and logic inference method
JP2013008221A
Data processing device, and data processing method thereof
JP2019003414A
Task activating for accelerated deep learning
WO2018193370A1
Cited By
Wafer map analysis system using neural network and method of analyzing wafer map using the same
US20230029163A1
