FPGA k-Stage Pipeline for Sparse Matrix Multiplication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current hardware, particularly modern multicore CPUs, exhibit poor performance and high energy inefficiency in sparse matrix-dense matrix multiplication due to low arithmetic intensity, indirect memory access, and lack of temporal and spatial locality, leading to cache pollution and memory overhead, which hampers performance in applications like scientific computing and data mining.

Innovation Solution

A k-stage pipeline architecture on a single Field Programmable Gate Array (FPGA) module is used to interleave threads, employing c-slowing and retiming techniques to compensate for accumulator delay, allowing simultaneous activation of multiple threads and optimizing data-level parallelism, thereby increasing arithmetic density and reducing energy consumption.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional hardware (multicore CPUs) is used for sparse matrix-dense matrix multiplication, then the system can handle general computing tasks, but the arithmetic intensity is low and energy efficiency deteriorates

Engineering Contradiction:
Improvearithmetic intensityVSAvoidenergy efficiency
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The patent segments the SpMM computation into multiple independent threads that operate in parallel on different rows of the sparse matrix. Each thread processes a specific row independently, allowing the system to maximize arithmetic intensity for non-zero elements while avoiding wasted computation on zero elements. This segmentation enables efficient utilization of FPGA resources and improves energy efficiency by focusing computational effort only where needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by optimizing the computation pipeline specifically for sparse matrix operations rather than using a general-purpose CPU architecture. The FPGA is configured with dedicated hardware components (multipliers, accumulators, memory interfaces) that are locally optimized for the specific pattern of sparse matrix multiplication, thereby achieving high arithmetic intensity and energy efficiency for this specific operation.

Inventive Principle:
Principle #3Local quality

2Speed

If conventional hardware uses floating point operations at peak performance, then computational speed is maximized, but energy consumption reaches 50-75% of peak consumption

Engineering Contradiction:
Improvefloating point operations per secondVSAvoidenergy consumption
Core Design Contradiction:
SpeedVSLoss of energy

Solution Approach 1:

The patent employs dynamic pipeline scheduling on the FPGA, where k-stage threads are interleaved and activated based on data availability and pipeline stage readiness. This dynamic approach allows the system to maintain high computational throughput by keeping pipeline stages continuously occupied with useful work, while avoiding the energy waste of maintaining peak performance across all computational units simultaneously. The pipeline can be dynamically adjusted to match the actual computational workload.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent implements continuous useful action through the k-stage pipeline architecture, where multiple threads are interleaved to ensure that each pipeline stage always has work to perform. By carefully scheduling thread activation so that a first result from thread t0 is ready one cycle after the first input of thread tk-1 is fed into the pipeline, the system maintains continuous computational flow without idle cycles, thereby achieving high speed with reduced energy loss compared to peak-performance operation.

Inventive Principle:
Principle #20Continuity of useful action

3Productivity

If conventional systems perform SpMM operations, then the operations can be executed, but indirect memory access causes cache pollution and memory overhead

Engineering Contradiction:
ImproveSpMM operation executionVSAvoidmemory overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by pre-fetching and storing non-zero elements of the sparse matrix into on-chip memory (block RAM or distributed RAM) before the multiplication operation begins. This pre-loading of data eliminates the need for repeated indirect memory accesses during computation, as all necessary data is already available in fast on-chip memory. This approach reduces memory overhead by avoiding cache pollution and eliminates the complexity of managing indirect memory access patterns.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary layer in the form of on-chip memory that sits between the sparse matrix storage and the computational units. This intermediary memory buffers the non-zero elements and provides direct, sequential access to the computational pipeline, eliminating the indirect memory access patterns that cause cache pollution in conventional systems. The intermediary memory simplifies the memory access pattern and reduces overall memory system complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10685082B2Sparse matrix multiplication using a single field programmable gate array module
Publication Date: 2020.06.16 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10685082B2 patent drawing
  • US10685082B2 patent drawing
  • US10685082B2 patent drawing

AI summary

According to some embodiments, a computer-implemented method for performing sparse matrix dense matrix (SpMM) multiplication on a single field programmable gate array (FPGA) module comprising a k-stage pipeline is described. The method may include interleaving k-stage threads on the k-stage pipeline comprising a plurality of threads t0 to tk-1, wherein a first result of thread t0 is ready one cycle after the first input of thread tk-1 is fed into the pipeline, and outputting a result matrix Y.