Training neural networks in programmable device blocks directly using backpropagation.

By training neural networks directly on programmable device blocks using backpropagation and converting neuron equivalents to hardware building blocks, the technique addresses deployment challenges in resource-constrained environments, achieving efficient and accurate DNN implementations on programmable devices.

JP7535542B2Active Publication Date: 2024-08-16XILINX INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2021576147
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-06-21
Filing Date
2020-04-17
Publication Date
2024-08-16
Estimated Expiration
2040-04-17

AI Technical Summary

Technical Problem

The deployment of deep neural networks (DNNs) in energy- and resource-constrained hardware environments is hindered by their large memory and computational footprints, and traditional fixed hardware architectures for programmable devices like FPGAs create optimization barriers and require complex compilers, limiting their performance.

Method used

A technique for training neural networks directly on programmable device blocks using backpropagation, defining hardware building blocks (HBBs) and neuron equivalents (NEQs), and converting NEQs to HBBs within a machine learning framework, allowing direct mapping to programmable device hardware without custom architectures or scheduling tools.

Benefits of technology

This approach enables efficient, customizable deployment of DNNs on programmable devices by aligning neural network topology with device fabric functionality, resulting in a highly pipelineable, massively parallel circuit that maintains accuracy and reduces computational and memory costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007535542000007
    Figure 0007535542000007
  • Figure 0007535542000006
    Figure 0007535542000006
  • Figure 0007535542000008
    Figure 0007535542000008
Patent Text Reader

Abstract

An example method for training a neural network comprises defining hardware building blocks (HBBs), neuron equivalents (NEQs) and a conversion procedure from NEQs to HBBs, defining a neural network using the NEQs in a machine learning framework, training the neural network on a training platform, converting the trained neural network into an HBB netlist using the conversion procedure, and converting the NEQs in the neural network into the HBB netlist.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] Technical Field Examples of the present disclosure relate generally to neural networks, and more particularly to training neural networks of programmable device blocks directly using backpropagation. [Background technology]

[0002] background As the size of deep neural networks (DNNs) continues to grow to improve their predictive capabilities, their memory and computational footprints also grow, making them increasingly difficult to deploy in energy- and resource-constrained hardware environments. DNNs, which use floating-point arithmetic, have a large amount of redundancy, which can reduce computational and memory costs. These techniques include quantization, pruning, and low-rank decomposition. Of the proposed quantization techniques, training-based quantization (quantizing DNNs during the training process) has yielded some of the most promising results in terms of reducing the amount of work while maintaining accuracy in the form of quantized neural networks (QNNs). The most extreme form of quantization is the binary neural network (BNN), which constrains weights and activations to two values, significantly lowering computational and memory costs while maintaining high accuracy.

[0003] Traditionally, the strategy to create DNN accelerators for programmable devices such as field programmable gate arrays (FPGAs) has been to map artificial neurons onto a fixed hardware architecture by placing the learned parameters in memory and scheduling operations to ensure the correct calculations between the corresponding weights and activations. The fixed hardware architecture is then implemented using lookup tables (LUTs), digital signal processors (DSPs) and other programmable device resources. Viewing the problem as a whole, the fixed architecture acts as an interface between the capabilities of the fabric and the operations the DNN performs. However, this interface also creates an obstacle to optimizations that allow the DNN to take full advantage of the programmable device fabric. Moreover, the fixed architecture requires significant optimizing compilers to map and schedule the DNN computations onto the hardware, which can further degrade performance. Summary of the Invention [Means for solving the problem]

[0004] overview Techniques are described for training neural networks of programmable device blocks directly using backpropagation. In one example, a method for training a neural network comprises defining a hardware building block (HBB), a neuron equivalent (NEQ), and a conversion procedure from the NEQ to the HBB, defining a neural network using the NEQ in a machine learning framework, training the neural network in a training platform, and converting the trained neural network to a netlist of the HBB using the conversion procedure to convert the NEQ in the neural network to the HBB netlist.

[0005] In another example, a non-transitory computer-readable medium having stored thereon instructions that, when executed by a processor, cause the processor to perform a method for training a neural network, the method including defining a hardware building block (HBB), a neuron equivalent (NEQ), and a NEQ to HBB conversion procedure, defining a neural network using the NEQ in a machine learning framework, training the neural network on a training platform, and converting the trained neural network into an HBB netlist using the conversion procedure to convert the NEQ in the neural network to the HBB in the netlist.

[0006] In another example, a computing system includes a system memory configured to store code implementing a design tool, a training platform, and a processor coupled to the system memory and the training platform, where the processor is configured to execute the code to perform training of a neural network by defining hardware building blocks (HBBs), neuron equivalents (NEQs), and a conversion procedure from NEQs to HBBs, defining the neural network with the NEQs in a machine learning framework, training the neural network on the training platform, and converting the trained neural network to an HBB netlist using the conversion procedure to convert the NEQs in the neural network to the HBBs in the netlist.

[0007] These and other aspects can be understood with reference to the following detailed description. In a manner in which the above features may be understood in detail, a more detailed description of the briefly outlined implementations may be provided by reference to implementations, some of which are illustrated in the accompanying drawings, which should not be considered as limiting the scope thereof, however, as they illustrate only typical examples of implementations. [Brief description of the drawings]

[0008] [Figure 1A] FIG. 1 is a block diagram illustrating a hardware acceleration system according to an example. [Figure 1B] FIG. 1 is a block diagram illustrating an acceleration application according to an example. [Diagram 2] FIG. 1 is a block diagram illustrating an example computing system ("computer"). [Diagram 3] FIG. 2 is a flow diagram illustrating a method for training a neural network according to an example. [Figure 4] 4 is a flow diagram illustrating a method for performing a portion of the method shown in FIG. 3 according to an example. [Diagram 5] FIG. 1 is a block diagram illustrating an example of a neural network with a sparse graph topology. [Figure 6A] FIG. 1 is a block diagram illustrating a multi-integrated circuit (IC) programmable device according to an example. [Figure 6B] FIG. 1 is a block diagram showing a programmable IC according to an example. [Figure 6C] FIG. 1 is a block diagram showing a system-on-chip (SOC) implementation of a programmable IC according to an example. [Figure 6D] FIG. 1 illustrates a field programmable gate array (FPGA) implementation of a programmable IC according to an example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] For ease of understanding, identical reference numerals have been used, where possible, to designate identical elements common to the figures, and it is believed that elements of one example may be usefully incorporated in other examples.

[0010] Detailed Description Various features are described below with reference to the drawings. It should be noted that the figures may or may not be drawn to scale, and that similar structural elements or features are represented by similar reference numerals throughout the drawings. It should be noted that the drawings are intended only to facilitate the description of features. They are not intended as an exhaustive description of the claimed invention or as a limitation on the scope of the claimed invention. Additionally, the illustrated example need not have all aspects or advantages shown. An aspect or advantage described in connection with a particular example is not necessarily limited to that example and may be implemented in any other example, even if not so illustrated or not so explicitly described.

[0011] Techniques are described for training neural networks of programmable device blocks directly using backpropagation. These techniques directly expose the building blocks of the programmable device fabric (e.g., look-up tables (LUTs), block random access memories (BRAMs), and combinations thereof) to machine learning frameworks. These techniques allow deep neural networks (DNNs) to be customized during the training phase in a manner that maps directly to efficient programmable device hardware implementations without the need to define custom overlay architectures or scheduling tools. In essence, these techniques allow the topology of the neural network to reflect the capabilities of the programmable device fabric by using artificial neurons with quantized inputs, quantized outputs, and arbitrary weights. Once the network is trained, each neuron can be mapped to the truth table of one of the building blocks. The resulting netlist can be placed and routed on the programmable fabric of a device of sufficient size as a highly pipelineable massively parallel circuit implementing the same neural network. These and other aspects are described below with reference to the drawings.

[0012] 1A is a block diagram illustrating an example hardware acceleration system 100. The hardware acceleration system 100 includes a host computing system 102. The host computing system 102 includes a hardware platform ("hardware 104") and a software platform ("software 106") that executes on the hardware 104. The hardware 104 includes a processing system 110, a system memory 116, a storage device ("storage 118"), and a hardware accelerator 122. The software 106 includes an operating system (OS) 144, an acceleration stack 146, a host application 150, and a contention thread 139.

[0013] The processing system 110 includes a microprocessor 112, support circuits 114, and a peripheral bus 115. The microprocessor 112 may be any type of general-purpose central processing unit (CPU), such as an x86-based processor, or an ARM-based processor. The microprocessor 112 may include one or more cores and associated circuits (e.g., cache memory, memory management unit (MMU), interrupt controller, etc.). The microprocessor 112 is configured to execute program code that performs one or more operations described herein, which may be stored in a system memory 116 and / or storage 118. The support circuits 114 include various devices that cooperate with the microprocessor 112 to manage data flow between the microprocessor 112, the system memory 116, the storage 118, the hardware accelerator 122, or any other peripheral devices. For example, the support circuits 114 may include a chipset (e.g., a northbridge, a southbridge, a platform host controller, etc.), a voltage regulator, and firmware (e.g., a basic input / output system (BIOS)), etc. The support circuits 114 manage the flow of data between the microprocessor 112 and a peripheral bus 115 to which various peripherals, such as a hardware accelerator 122, are connected. In some examples, the microprocessor 112 may be a System-in-Package (SiP) or System-on-Chip (SOC) that absorbs all or a substantial portion of the functionality of a chipset (e.g., northbridge, southbridge, etc.). The peripheral bus 115 may implement an expansion bus standard, such as Peripheral Component Interconnet Express (PCIe).

[0014] System memory 116 is a device that allows information, such as executable instructions and data, to be stored and retrieved. System memory 116 may include one or more random access memory (RAM) modules, such as, for example, double data rate (DDR) dynamic RAM (DRAM). Storage 118 includes local storage devices (e.g., one or more hard disks, flash memory modules, solid state disks, and optical disks) and / or storage interfaces that allow computing system 102 to communicate with one or more networked data storage systems. Hardware 104 may include various other conventional devices and peripherals of a computing system, such as a graphics card and a universal serial bus (USB) interface.

[0015] In one example, the hardware accelerator 122 includes a programmable device 128 and a RAM 126. The hardware accelerator 122 may optionally include a non-volatile memory (NVM) 124. The programmable device 128 may be a SOC having field programmable gate array (FPGA) or FPGA programmable logic along with other embedded subsystems. The NVM 124 may include any type of non-volatile memory, such as flash memory. The RAM 126 may include DDR DRAM, etc. The RAM 126 may be organized into discrete RAM banks 127, as described further below. The programmable device 128 is coupled to the NVM 124 and the RAM 126. The programmable device 128 is also coupled to the peripheral bus 115 of the processing system 110.

[0016] OS 144 can be any commodity operating system known in the art, such as Linux, Microsoft Windows, Mac OS, etc. Acceleration stack 146 includes drivers and libraries that provide an application programming interface (API) for the command and control of hardware accelerator 122.

[0017] 1B is a block diagram illustrating an example of an accelerated application 180. The accelerated application 180 includes a host application 150 and an acceleration circuit 130. The acceleration circuit 130 is programmed in the programmable logic (PL) 3 of the programmable device 128 on the hardware accelerator 122. The host application 150 includes software that runs on the microprocessor 112, which invokes the acceleration circuit 130 using API calls to the acceleration stack 146 to perform certain tasks. The host application 150 may include types of applications such as neural networks, video processing, or network processing that offload some functions to the hardware accelerator 122.

[0018] 2 is a block diagram illustrating an example computing system ("computer 200"). Computer 200 includes a software platform 204 executing on a hardware platform 202. Hardware platform 202 includes a central processing unit (CPU) 206, a system memory 208, a storage device 210, support circuits 211, and a training platform 212. Software platform 204 includes an operating system (OS) 230 and design tools 235.

[0019] The CPU 206 may be any type of general-purpose central processing unit (CPU), such as an x86-based processor or an ARM-based processor. The CPU 206 may include one or more cores and associated circuits (e.g., cache memory, memory management unit (MMU), interrupt controller, etc.). The CPU 206 is configured to execute program code that may be stored in the system memory 208 and / or storage device 210 to perform one or more operations described herein. The support circuits 211 include various devices that cooperate with the CPU 206 to manage data flow between the CPU 206, the system memory 208, the storage device 210, the training platform 212, the hardware accelerator 214, or any other peripheral devices. For example, the support circuits 211 may include a chipset (e.g., a northbridge, a southbridge, a platform host controller, etc.), voltage regulators, and firmware (e.g., a BIOS), etc. In some examples, the CPU 206 may be a system-in-package (SiP) or a system-on-chip (SoC), etc., absorbing all or a substantial portion of the functionality of a chipset (e.g., a northbridge, a southbridge, etc.).

[0020] The system memory 208 is a device that allows information such as executable instructions and data to be stored and retrieved. The system memory 208 may include one or more random access memory (RAM) modules, such as, for example, double data rate (DDR) dynamic RAM (DRAM). The system memory 208 may store data 226 and program code ("code 228") that is processed and executed by the CPU 226 to implement the software platform 204. The storage device 210 includes local storage devices (e.g., one or more hard disks, flash memory modules, solid state disks, and optical disks) and / or storage interfaces that allow the computer 200 to communicate with one or more networked data storage systems. The hardware platform 202 may include various other conventional devices and peripherals of a computing system, such as a graphics card and a universal serial bus (USB) interface.

[0021] The training platform 212 includes hardware 216, which may include a processor(s), memory, input / output (IO) circuitry, and the like. In one example, the hardware 216 includes a graphics processing unit (GPU) and associated support circuitry. In another example, the hardware 216 may include an application specific integrated circuit (ASIC) or a programmable IC, and the like, along with associated support circuitry. In one example, the training platform 212 has higher performance than the hardware accelerator 122, but also has higher energy consumption than the hardware accelerator 122. The training platform 212 can be used to train a neural network.

[0022] OS 230 can be any commodity operating system known in the art, such as Linux, Microsoft Windows, or Mac OS. Design tools 235 include software for training the neural network on training platform 212 and for implementing the neural network for the target programmable device.

[0023] 3 is a flow diagram illustrating an example method 300 for training a neural network. The method 300 is executable by the design tool 235 on the computer 200 described above. The method 300 begins at step 302, where the design tool 235 defines hardware building blocks (HBBs), neuron equivalents (NEQs), and transformation procedures.

[0024] HBB is a primitive available in the programmable device fabric that can implement a truth table. For example, the programmable fabric can include look-up tables (LUTs) and block RAMs (BRAMs). HBB implements truth tables of different sizes. The number of input bits to an HBB truth table is B A The number of output bits (i.e., the number of different output variables) is denoted as B W The contents of the truth table are called the configuration of the HBB. In general, any memory component can implement a truth table of a certain size and can be used as an HBB.

[0025] A NEQ is a computational graph represented in a machine learning framework. In one example, a NEQ includes multiply-accumulate operations on inputs and learnable parameters followed by a nonlinear function. A NEQ includes quantized inputs and outputs, but may have floating-point parameters. Each NEQ is mathematically equivalent to an HBB and can be converted to an HBB by a conversion procedure. In general, a memory device can handle any form of reduction as long as the following conditions are met:

[0026]

number

[0027] In the formula, B A is the number of address bits of the memory component, and C in is the number of input channels, and B i is the number of bits used for the i-th input channel. NEQ may contain any number of element-wise or non-element-wise operations, as long as the last operation satisfies the following constraints:

[0028]

number

[0029] In the formula, C out is the number of output channels, and B O is the number of bits for the oth output channel, and B W is the number of output bits (e.g., memory width). Each NEQ contains parameters that can be learned using gradient methods such as standard backpropagation. Thus, NEQs contain only semi-differentiable functions.

[0030] The conversion procedure takes an NEQ with trained parameters and outputs an HBB with its configuration. The type of HBB that the NEQ maps to is statically determined (i.e., each NEQ type maps to only one HBB type). Because the NEQ has quantized inputs and outputs, the configuration of the HBB (i.e., truth table) can be generated simply by evaluating all permutations of the inputs of the trained NEQ and observing the outputs. Each (input, output) pair becomes one row of the truth table.

[0031] Examples of HBB and NEQ are described below. For example, B A =6 and B WConsider a 6-to-1 LUT with θ = 1. Other types of LUT configurations are available if available in the target device. In general, each NEQ may include a dot-product operation and a nonlinear operation (e.g., threshold operation). Optionally, an NEQ may include one or more additional operations, such as element-wise operations (e.g., batch normalization) between the dot-product operation and the nonlinear operation. Such an NEQ is mapped to a LUT. The conversion involves enumerating each possible input (e.g., here 2^6 = 64 possibilities), evaluating the trained equation for each possible input, and inputting the (input, output) pairs into an HBB truth table.

[0032] In another example, a BRAM is used as the HBB. Although a BRAM has been described, any type of RAM element in the fabric can be used. A BRAM can be configured in many different ways, functioning as a memory device in each example. For example, consider a BRAM that can be configured as two independent 18k memories or as one 36k memory. Furthermore, each of these configurations can have multiple modes that vary the number of bits per word as well as the capacity of the memory (e.g., 16k 1-bit words, 8k 2-bit words, etc. for the 18k configuration) and (e.g., 32k 1-bit words, 16k 2-bit words, etc. for the 36k configuration). In such an example, for a 2×18k configuration, 14 / 1, 13 / 2, 12 / 4, 11 / 9, 10 / 18, and 9 / 36 BRAMs can be used. A / B W In this configuration, there are effectively two parallel NEQs, each with its own independent B A / B W In the 1x36k configuration, the following B modes are supported: 15 / 1, 14 / 2, 13 / 4, 12 / 9, 11 / 18, 10 / 36, and 9 / 72. A / B W A BRAM-mappable NEQ is similar to a LUT-mappable NEQ. However, unlike a 6-to-1 LUT, a BRAM can generate a higher bit-width output. Like a LUT-based NEQ, a BRAM-mappable NEQ is similar to a LUT-mappable NEQ. WIt may contain any number of element-wise operations, so long as it satisfies the constraints:

[0033] 4 is a flow diagram illustrating how to perform step 302 in method 300 according to an example. In step 402, design tool 235 identifies an HBB for a given programmable device fabric. In step 404, for each HBB, design tool 235 defines one or more NEQs in a machine learning framework. Each NEQ is trainable using backpropagation. In step 406, for each NEQ type, design tool 235 identifies a conversion procedure from a learned neuron to its corresponding HBB.

[0034] Returning to FIG. 3, in step 304, a user interacts with the design tool 235 to define a DNN using NEQs in a machine learning framework, such as PyTorch or TensorFlow, and train the DNN. With available NEQs identified in step 302, a user builds a DNN topology by instantiating the NEQs and connecting them. The topology can be trained on a labeled dataset in the machine learning framework using backpropagation.

[0035] Theoretically, there is no limit to the number and connectivity of NEQs. However, in practice, each NEQ is mapped back to the HBB, and the capacity and interconnect structure of the programmable device must be considered. For example, FIG. 5 is a block diagram showing an example of a neural network with a sparse graph topology. The neural network includes LUT layers 502 and 504 and an output layer 508. A data set 501 is applied to the LUT layer 502. The data set 501 is sparsely connected to the LUT layer 502. The LUT layer 502 is sparsely connected to the LUT layer 504. The LUT layer 504 is fully connected to the output layer 508. Each LUT layer 502, 504 includes multiple LUT NEQs 510. Each LUT NEQ 510 includes a sum operator 512 and a nonlinear operator 514 (e.g., a greater than or equal operator). In this example, each LUT layer is sparsely connected to the next layer, i.e., not all LUT inputs in level N+1 are directly connected to all LUT outputs in level N. This allows for an increase in the fan-in of the output nodes without exponentially increasing their width in the previous layer, implying multilevel logic synthesis. The connection pattern between layers may be chosen randomly or according to a predefined sparse pattern known to be conducive to place-and-route algorithms. Furthermore, the scheme allows for sharing intermediate outputs generated along the way to generate new / different neuron outputs.

[0036] In one example, a user can generate a hybrid topology by including non-NEQ building blocks such as standard convolutional layers, fully connected layers, and pooling layers. However, in such a case, the techniques described herein are applied only to the NEQ portion of the topology. That is, the design tool 235 only maps the NEQ of the topology to HBB. The remaining non-NEQ portion of the topology, as well as the connectivity between the NEQ and non-NEQ portions, are also mapped to hardware using conventional methods (e.g., by defining an overlay architecture and using a mapping and scheduling tool). For example, a network can be constructed that starts with a regular floating-point convolutional layer and ends with a LUT layer, trainable with backpropagation, with the first portion mapped to a fixed hardware architecture and the second portion directly converted to HBB (e.g., LUT, BRAM, etc.).

[0037] As long as the NEQ from step 302 is differentiable, the topology built from the NEQ (and optionally non-NEQ conventional deep learning layers) can be trained end-to-end using the backpropagation algorithm. Because the NEQ has quantized inputs and outputs, the straight-through estimator (STE) technique can be used to propagate gradients through the quantized functions, which has been shown to work well in practice for QNNs and BNNs. Because backpropagation is used for training, techniques applied to improve standard neural network training, such as knowledge distillation and ensembling, can be applied.

[0038] Returning to FIG. 3, in step 306, the design tool 235 uses a transformation procedure to convert the trained network of NEQs into a netlist of HBBs. Once the topology has been trained to a desired accuracy, the transformation procedure from step 302 is applied to each NEQ to transform it into its equivalent HBB. With the trained NEQ parameters obtained in step 304, the transformation procedure will evaluate each NEQ with each possible input combination to obtain an output. Each (input->output) mapping corresponds to one row of the truth table that the HBB needs to implement. Due to the quantum nature of the inputs and outputs of the NEQs, the resulting HBB produces the same results as the NEQ for any input. Running this procedure for each NEQ produces a netlist of the constructed HBBs, each HBB mimicking the connectivity and functionality of the original NEQ.

[0039] In step 308, the design tool 235 optionally performs any post-processing optimizations that can be applied to the netlist to generate an implementation for the target programmable device. For example, a heuristic logic minimizer can be applied to the netlist to reduce the number of LUTs used, pipeline registers can be inserted between layers to increase the clock frequency, or the netlist can be split into chunks and mapped one chunk at a time to a smaller programmable device with dynamic partial reconfiguration. Once optional post-processing is complete, the final netlist is run through a place-and-route algorithm to generate a bitfile for the programmable device. Notably, logic synthesis and technology mapping are not required because the HBB corresponds to the primitives of the target programmable fabric. The resulting design is massively parallel and is identical to the network trained from step 304. Additionally, unless the netlist was split during optimization, the hardware implementation of the neural network can classify inputs at the clock rate of the circuit.

[0040] 6A is a block diagram illustrating a programmable device 54 according to an example. The programmable device 54 can be used to implement the programmable device 128 in the hardware accelerator 122. The programmable device 54 includes a plurality of programmable integrated circuits (ICs) 1, for example, programmable ICs 1A, 1B, 1C, and 1D. In an example, each programmable IC 1 is an IC die disposed on an interposer 51. Each programmable IC 1 includes a super logic region (SLR) 53 of the programmable device 54, for example, SLRs 53A, 53B, 53C, and 53D. The programmable ICs 1 are interconnected via conductors (referred to as SLLs (Super Long Lines) 52) on the interposer 51.

[0041] FIG. 6B is a block diagram illustrating a programmable IC 1 according to an example. The programmable IC 1 may be used to implement one of the programmable ICs 1A-1D of the programmable device 128 or the programmable device 54. The programmable IC 1 includes a programmable logic 3 (also called a programmable fabric), a configuration logic 25, and a configuration memory 26. The programmable IC 1 is capable of coupling to external circuits such as a non-volatile memory 27, a DRAM 28, and other circuits 29. The programmable logic 3 includes logic cells 30, support circuits 31, and a programmable interconnect 32. The logic cells 30 include circuits that are configurable to implement a general logic function of multiple inputs. The support circuits 31 include dedicated circuits such as transceivers, input / output blocks, digital signal processors, and memories. The logic cells and the support circuits 31 are capable of interconnection using the programmable interconnect 32. Information for programming logic cells 30, setting parameters of support circuits 31, and programming programmable interconnects 32 is stored in configuration memory 26 by configuration logic 25. Configuration logic 25 may obtain configuration data from non-volatile memory 27 or other sources (e.g., DRAM 28 or other circuits 29). In some examples, programmable IC 1 includes processing system 2. Processing system 2 may include microprocessor(s), memory, support circuits, IO circuits, etc. In some examples, programmable IC 1 includes network-on-chip (NOC) 55 and data processing engine (DPE) array 56. NOC 55 is configured to provide communication between subsystems of programmable IC 1, such as between PS2, PL3, and DPE array 56. DPE array 56 may include an array of DPEs configured to perform data processing, such as an array of vector processors.

[0042] FIG. 6C is a block diagram showing an SOC implementation of a programmable IC 1 according to an example. In this example, the programmable IC 1 includes a processing system 2 and a programmable logic 3. The processing system 2 includes various processing units, such as a real-time processing unit (RPU) 4, an application processing unit (APU) 5, a graphics processing unit (GPU) 6, a configuration and security unit (CSU) 12, and a platform management unit (PMU) 122. The processing system 2 also includes various support circuits, such as an on-chip memory (OCM) 14, a transceiver 7, peripherals 8, an interconnect 16, a DMA circuit 9, a memory controller 10, peripherals 15, and a multiple input / output (MIO) circuit 13. The processing units and support circuits are interconnected by the interconnect 16. The PL 3 is also coupled to the interconnect 16. The transceiver 7 is coupled to an external pin 24. The PL 3 is coupled to an external pin 23. The memory controller 10 is coupled to an external pin 22. The MIO 13 is coupled to an external pin 20. The PS2 is typically coupled to external pins 21. The APU 5 may include a CPU 17, a memory 18, and support circuits 19.

[0043] In the example of Figure 6C, programmable IC1 may be used in hardware accelerator 122 and function as described above. Acceleration circuit 130 may be programmed in PL3 and function as described above. In other examples, the functionality of hardware 104 described above may be implemented using the PS2 rather than via the computing system's hardware. In such a case, software 106 runs on the PS2 and functions as described above.

[0044] With reference to the PS2, each of the processing units includes one or more central processing units (CPUs) and associated circuitry such as memory, interrupt controllers, direct memory access (DMA) controllers, memory management units (MMUs) and floating point units (FPUs), etc. Interconnect 16 includes various switches, buses, communication links, etc. configured to interconnect the processing units as well as to interconnect other components within the PS2 to the processing units.

[0045] The OCM 14 includes one or more RAM modules, which may be distributed throughout the PS2. For example, the OCM 14 may include battery-backed RAM (BBRAM) and tightly coupled memory (TCM), etc. The memory controller 10 may include a DRAM interface for accessing external DRAM. The peripherals 8, 15 may include one or more components that provide an interface to the PS2. For example, the peripherals 15 may include a graphics processing unit (GPU), a display interface (e.g., a DisplayPort, a high-definition multimedia interface (HDMI) port, etc.), a universal serial bus (USB) port, an Ethernet port, a universal asynchronous transceiver (UART) port, a serial peripheral interface (SPIRIT) port, a general purpose IO (GPIO) port, a serial advanced technology attachment (SATA) port, and a PCIe port, etc. The peripherals 15 may be coupled to the MIO 13. The peripherals 8 may be coupled to the transceiver 7. The transceiver 7 may include a serializer / deserializer (SERDES) circuit, a multi-gigabit transceiver (MGT), and the like.

[0046] FIG. 6D illustrates a field programmable gate array (FPGA) implementation of programmable IC 1 including PL3. PL3 illustrated in FIG. 6D can be used in any of the examples of programmable devices described herein. PL3 includes transceivers 37, configurable logic blocks ("CLBs") 33, random access memory blocks ("BRAMs") 34, input / output blocks ("IOBs") 36, configuration and clocking logic ("CONFIG / CLOCKS") 42, digital signal processing blocks ("DSPs") 35, dedicated input / output blocks ("I / Os") 41 (e.g., configuration and clock ports), and other programmable logic 39 such as digital clock managers, analog-to-digital converters, system monitoring logic, etc. PL3 may also include a PCIe interface 40 and an analog-to-digital converter (ADC) 38, etc.

[0047] Depending on the PL, each programmable tile may include at least one programmable interconnect element ("INT") 43 with connections to input and output terminals 48 of programmable logic elements in the same tile, as shown by the example included at the top of FIG. 6D. Each programmable interconnect element 43 may also include connections to interconnect segments 49 of adjacent programmable interconnect element(s) in the same tile or other tile(s). Each programmable interconnect element 43 may also include connections to interconnect segments 50 of general routing resources between logic blocks (not shown). The general routing resources may include routing channels between logic blocks (not shown) that include tracks of interconnect segments (e.g., interconnect segments 50) and switch blocks (not shown) for connecting the interconnect segments. The interconnect segments of the general routing resources (e.g., interconnect segments 50) may span one or more logic blocks. The programmable interconnect elements 43 together with the general routing resources implement a programmable interconnect structure ("programmable interconnect") for the illustrated PL.

[0048] In one implementation, the CLB 33 may include one programmable interconnect element ("INT") 43 in addition to configurable logic elements ("CLE") 44 that are programmable to implement user logic. The BRAM 34 may include a BRAM logic element ("BRL") 45 in addition to one or more programmable interconnect elements. In general, the number of interconnect elements included in a tile depends on the height of the tile. In the illustrated example, the BRAM tile has a height of five CLBs, although other numbers (e.g., four) can be used. The DSP tile 35 may include a DSP logic element ("DSPL") 46 in addition to any suitable number of programmable interconnect elements. The IOB 36 may include, for example, two instances of an input / output logic element ("IOL") 47 in addition to one instance of a programmable interconnect element 43. As will be apparent to one skilled in the art, the actual I / O pads connected to, for example, the input / output logic element 47 are typically not limited to the area of ​​the input / output logic element 47.

[0049] In the illustrated example, a horizontal region near the center of the die (shown in FIG. 3D) is used for configuration, clocks, and other control logic. Vertical columns 51 extending from this horizontal region or column are used to distribute clock and configuration signals across the width of the PL.

[0050] Some PLs utilizing the architecture shown in Figure 6D include additional logic blocks that break up the typical columnar structure that makes up most of the PL. The additional logic blocks can be programmable blocks and / or dedicated logic.

[0051] It should be noted that Figure 6D is intended to illustrate an example PL architecture only. For example, the number of logic blocks in a row, the relative width of the rows, the number and order of the rows, the types of logic blocks included in the rows, the relative sizes of the logic blocks, and the interconnect / logic implementation included in the upper portion of Figure 6D are merely illustrative. For example, in an actual PL, wherever a CLB appears will typically include one or more rows of adjacent CLBs to facilitate efficient implementation of user logic, although the number of adjacent CLB rows will vary depending on the size of the overall PL.

[0052] We have described techniques for training neural networks on programmable device blocks directly using backpropagation. These new techniques include the recognition that implementing fixed architectures on top of LUTs and other programmable device building blocks is a barrier to optimizing neural networks for running on programmable devices. These techniques include mapping between programmable device primitives and quantized neurons with single LUTs and RAMs in different modes. The programmable device primitives are exposed to machine learning frameworks and trainable with backpropagation. Multiple levels of binary neurons can be stacked and sparsely connected to increase the indirect fan-in, trained with backpropagation and STE in machine learning frameworks, and mapped to a network of LUTs for placement on the programmable fabric of the target programmable device.

[0053] While the above relates to particular examples, other and still other examples may be devised without departing from the basic scope thereof, the scope of which is defined by the appended claims.

Claims

1. 1. A method for training a neural network, comprising: Defining 302 Hardware Building Blocks (HBBs), Neuron Equivalents (NEQs), and a conversion procedure from NEQs to HBBs, where NEQs are computational graphs expressed in a machine learning framework, and each NEQ is mathematically equivalent to one HBB and can be converted to one HBB via the conversion procedure; defining the neural network using the NEQ in a machine learning framework (304); training (304) the neural network on a training platform (212); and converting (306) each of the NEQs in the neural network to one of the HBBs in the netlist using the conversion procedure to convert the trained neural network into a netlist of HBBs.

2. The method of claim 1 , further comprising post-processing (308) the netlist to perform one or more optimizations of the netlist.

3. 2. The method of claim 1, further comprising generating an implementation of the netlist for programming a programmable device.

4. The step of defining the HBB, the NEQ and the conversion procedure comprises: Identifying primitives in a programmable fabric of a programmable device to implement said HBB; defining, for each HBB, one or more of the NEQs in the machine learning framework; and for each NEQ, identifying a conversion procedure for a corresponding HBB.

5. 2. The method of claim 1, wherein each NEQ includes a quantized input and a quantized output, the sum of the widths of the quantized inputs being less than or equal to the number of address bits of a memory component implementing an HBB to which each of the NEQs is converted, and the sum of the widths of the quantized outputs being less than or equal to the width of the memory component.

6. 1. A non-transitory computer readable medium having stored thereon instructions that, when executed by a processor, cause the processor to perform a method for training a neural network, the method comprising: Defining hardware building blocks (HBBs), neuron equivalents (NEQs), and a conversion procedure from NEQs to HBBs, where NEQs are computational graphs expressed in a machine learning framework, and each NEQ is mathematically equivalent to one HBB and can be converted to one HBB via the conversion procedure; defining the neural network using the NEQ in a machine learning framework; training the neural network on a training platform; and converting each of the NEQs in the neural network to one of the HBBs in the netlist using the conversion procedure to convert the trained neural network into a netlist of HBBs.

7. The non-transitory computer-readable medium of claim 6 , further comprising post-processing the netlist to perform one or more optimizations on the netlist.

8. The non-transitory computer-readable medium of claim 6 , further comprising generating an implementation of the netlist for programming a programmable device.

9. The step of defining the HBB, the NEQ and the conversion procedure comprises: Identifying primitives in a programmable fabric of a programmable device to implement said HBB; defining, for each HBB, one or more of the NEQs in the machine learning framework; and for each NEQ, identifying a conversion procedure for a corresponding HBB.

10. 7. The non-transitory computer-readable medium of claim 6, wherein each NEQ includes a dot product operation and a non-linear operation, each NEQ includes a quantized input and a quantized output, the sum of the widths of the quantized inputs being less than or equal to a number of address bits of a memory component implementing an HBB to which each of the NEQs is converted, and the sum of the widths of the quantized outputs being less than or equal to a width of the memory component.

11. A computing system (200), comprising: a system memory (208) configured to store code implementing the design tool; A training platform (212); a processor (206) coupled to the system memory and to the training platform, the processor executing the code to train a neural network: Defining 302 Hardware Building Blocks (HBBs), Neuron Equivalents (NEQs), and a conversion procedure from NEQs to HBBs, where NEQs are computational graphs expressed in a machine learning framework, and each NEQ is mathematically equivalent to one HBB and can be converted to one HBB via the conversion procedure; defining the neural network using the NEQ in a machine learning framework (304); Training the neural network on the training platform (304); and converting (306) each of the NEQs in the neural network to one of the HBBs in the netlist using the conversion procedure to convert the trained neural network into a netlist of HBBs.

12. 12. The computing system of claim 11, wherein training the neural network further comprises post-processing the netlist to perform one or more optimizations on the netlist.

13. 12. The computing system of claim 11, wherein training the neural network further comprises generating an implementation of the netlist for programming a programmable device.

14. Defining the HBB, the NEQ and the conversion procedure includes: Identifying primitives in a programmable fabric of a programmable device to implement said HBB; defining, for each HBB, one or more of the NEQs in the machine learning framework; and for each NEQ, identifying a transformation procedure for a corresponding HBB.

15. 12. The computing system of claim 11, wherein each NEQ includes a dot product operation and a nonlinear operation, each NEQ includes a quantized input and a quantized output, the sum of the widths of the quantized inputs being less than or equal to a number of address bits of a memory component implementing an HBB to which each of the NEQs is converted, and the sum of the widths of the quantized outputs being less than or equal to a width of the memory component.

Citation Information

Patent Citations

  • System and device for calculating neural network model

    JP1992289957A