RNN Weight Matrix Storage in FPGA Embedded Block RAM

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Recurrent neural network (RNN) models face low data sequence processing efficiency due to the small capacity of first-level caches, which require frequent copying of weight matrices, limiting their ability to process all data simultaneously.

Innovation Solution

Copying the weight matrix of an RNN model to an embedded block RAM of a field-programmable gate array (FPGA) allows sequential processing of data sequences using an activation function, with the weight matrix stored in the embedded block RAM, reducing the need for frequent copying and improving processing efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If the weight matrix is stored in the first level cache of CPU or GPU, then the data processing speed is fast, but the cache capacity is small and cannot store all weight matrices simultaneously

Engineering Contradiction:
Improvedata processing speedVSAvoidcache capacity
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent transitions from using CPU/GPU first-level cache (traditional memory hierarchy) to using FPGA embedded block RAM (hardware-based memory), representing a dimensional change in the storage architecture. This allows the system to bypass the capacity limitations of conventional caches while maintaining fast access speeds through hardware-level memory operations in the FPGA.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If the weight matrix is copied to the first level cache for each data piece processing, then the processing can be performed, but the frequent copying leads to low data sequence processing efficiency

Engineering Contradiction:
Improvedata sequence processing efficiencyVSAvoidtime for copying weight matrix
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent loads the weight matrix into the FPGA embedded block RAM in advance, before the actual data sequence processing begins. This preliminary action eliminates the need for repeated copying operations during processing, as the weight matrix remains resident in the FPGA's fast memory throughout the entire data sequence processing pipeline.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

By maintaining the weight matrix continuously loaded in the FPGA embedded block RAM, the system enables uninterrupted processing of the data sequence. The continuous availability of the weight matrix in fast hardware memory eliminates idle time between processing operations, allowing the useful action of data transformation to proceed without interruption.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS11087203B2Method and apparatus for processing data sequence
Publication Date: 2021.08.10 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US11087203B2 patent drawing
  • US11087203B2 patent drawing
  • US11087203B2 patent drawing

AI summary

The present application discloses a method and apparatus for processing a data sequence. A specific implementation of the method includes: receiving an inputted to-be-processed data sequence; copying a weight matrix in a recurrent neural network model to an embedded block random access memory (RAM) of a field-programmable gate array (FPGA); processing sequentially each piece of to-be-processed data in the to-be-processed data sequence by using an activation function in the recurrent neural network model and the weight matrix stored in the embedded block RAM; and outputting a processed data sequence corresponding to the to-be-processed data sequence. This implementation improves the data sequence processing efficiency of the recurrent neural network model.