Sparse Matrix Vector Multiplication Block Partitioning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for sparse matrix-vector multiplication on highly parallel processors, such as GPUs, face inefficiencies due to load imbalance, lack of parallelism, and irregular memory access, particularly when dealing with matrix rows containing few non-zero elements, leading to poor performance and underutilization of processor resources.

Innovation Solution

The method partitions the sparse matrix into blocks of consecutive rows and determines the number of non-zero elements in each block, executing a first process (CSR-streaming) for blocks with fewer non-zero elements and a second process (CSR-vector) for blocks with more, optimizing resource use and improving parallel processing efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If a single process (CSR-vector) is used for sparse matrix-vector multiplication, then the implementation is simple, but performance deteriorates due to load imbalance and underutilization of processor resources when dealing with matrix rows containing few non-zero elements

Engineering Contradiction:
Improveimplementation complexityVSAvoidcomputation performance
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent dynamically selects between two different multiplication processes (CSR-streaming and CSR-vector) based on the characteristics of each block of matrix rows. Specifically, it evaluates the ratio of non-zero elements to total elements in each block and chooses the appropriate algorithm, thereby adapting the computational approach to match the data characteristics and maximize processor utilization

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the computational parameters by switching between two distinct algorithms (CSR-streaming for blocks with lower non-zero density and CSR-vector for blocks with higher non-zero density). This parameter change allows the system to optimize for either parallel processing efficiency or memory access efficiency depending on the specific block characteristics

Inventive Principle:
Principle #35Parameter changes

2Ease of operation

If matrix rows are processed individually, then memory access is simplified, but parallelism is reduced leading to underutilization of highly parallel processors

Engineering Contradiction:
Improvememory access simplicityVSAvoidparallel processing efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent segments the matrix into multiple blocks of consecutive rows and processes each block using a dedicated wavefront of threads. This segmentation enables better utilization of parallel processors by grouping rows that can be efficiently processed together while maintaining manageable memory access patterns within each block

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent merges multiple row processing operations into a single wavefront that processes an entire block of rows simultaneously. By combining the processing of multiple rows into one coordinated operation, the patent achieves better parallel utilization without significantly complicating memory access patterns

Inventive Principle:
Principle #5Merging (Combining)

3Ease of manufacture

If blocks with few non-zero elements are processed using standard methods, then the algorithm is simple to implement, but processor resources are underutilized leading to poor performance

Engineering Contradiction:
Improvealgorithm implementation easeVSAvoidresource utilization
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent dynamically adapts the computational approach by evaluating the non-zero element density of each block and selecting the appropriate algorithm. For blocks with fewer non-zero elements, it switches to CSR-streaming which better utilizes processor resources, while maintaining simplicity for blocks with higher density through CSR-vector

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS9697176B2Efficient sparse matrix-vector multiplication on parallel processors
Publication Date: 2017.07.04 ADVANCED MICRO DEVICES INC
  • US9697176B2 patent drawing
  • US9697176B2 patent drawing
  • US9697176B2 patent drawing

AI summary

A method of multiplication of a sparse matrix and a vector to obtain a new vector and a system for implementing the method are claimed. Embodiments of the method are intended to optimize the performance of sparse matrix-vector multiplication in highly parallel processors, such as GPUs. The sparse matrix is stored in compressed sparse row (CSR) format.