Dynamic Sparse Tensor Permutation for Dense Accelerator Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Neural networks with dynamic sparsity patterns, where sparsity is discovered at runtime, are inefficiently processed on commodity accelerators designed for dense computations, leading to poor performance in applications like natural language processing and image classification.

Innovation Solution

A compiling framework that transforms dynamic sparse tensors into dense tensors using data permutation and computation tiling, allowing for efficient execution on dense computation devices by decoupling sparse and dense computation stages, leveraging optimized dense computation kernels and hardware instructions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If dynamic sparse computation is performed on dense computation devices, then computation efficiency is improved, but device compatibility and performance are worsened

Engineering Contradiction:
Improvecomputation efficiencyVSAvoiddevice compatibility
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces a sparse-to-dense transformation layer as an intermediary between sparse computation and dense hardware. This transformation converts sparse tensors into dense tensors with compacted non-zero elements, enabling dense computation devices to process sparse data efficiently without requiring specialized hardware modifications.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the data representation parameter from sparse format to dense format through permutation operations. By transforming the sparsity pattern into a compacted dense representation, the system leverages optimized dense computation kernels while maintaining the benefits of sparse processing.

Inventive Principle:
Principle #35Parameter changes

2Power

If sparse data is processed using traditional dense computation methods, then hardware utilization is improved, but computation performance is worsened

Engineering Contradiction:
Improvehardware utilizationVSAvoidcomputation performance
Core Design Contradiction:
PowerVSProductivity

Solution Approach 1:

The patent performs preliminary compacting of sparse data into dense format before computation. This pre-processing step reorganizes non-zero elements to create compacted dense representations that can be efficiently processed by dense computation kernels, maximizing hardware utilization while maintaining performance.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the computation process into distinct stages: sparse-to-dense transformation, compacted dense computation, and result reconstruction. This segmentation allows each stage to be optimized independently, with the transformation stage preparing data for efficient dense processing.

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If dynamic sparsity patterns are discovered at runtime, then adaptability is improved, but computation overhead is worsened

Engineering Contradiction:
Improveruntime adaptabilityVSAvoidcomputation overhead
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent implements dynamic sparsity handling by allowing the sparse-to-dense transformation to adapt to runtime sparsity patterns. The system dynamically discovers and compacts sparsity patterns during execution, maintaining adaptability while minimizing overhead through efficient permutation operations.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS20240403618A1Performing dynamic sparse computation on dense computation-efficient computing devices
Publication Date: 2024.12.05 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20240403618A1 patent drawing
  • US20240403618A1 patent drawing
  • US20240403618A1 patent drawing

AI summary

Embodiments of the present disclosure include techniques processing dynamically sparse neural networks as dense computations. A permutation is performed to translate an input tensor from a sparse format into a dense format. Once in a dense format, dense computation can be performed to generate output data that is also in the dense format. A reverse permutation may then be performed to translate the output data back into the sparse format. An analysis of the operator is performed prior to runtime to determine the one or more dimensions of the tensor expression associated with the operator that are permutation invariant. The permutation may permutate the input tensor across dimensions that are permutation invariant.