Parallel Softmax Fragment Processing to Cut Memory Access

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The efficiency of Softmax activation function computation is hindered by memory access overhead and the risk of memory overflow due to large input vectors, particularly in parallel computing environments where accessing off-core or off-chip memory is slow and floating-point representation can lead to overflow errors and roundoff errors.

Innovation Solution

A method is introduced to compute the Softmax activation function by determining the natural logarithm of the sum of exponentials, reducing memory access by dividing the input vector into fragments processed in parallel, and using a max* operation to approximate the natural logarithm of the sum of exponentials without requiring a global maximum value, thus minimizing memory access and overflow risks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If the input vector is processed in parallel using multiple processing units, then the computational speed is improved, but the memory access overhead increases due to the need to access off-core or off-chip memory

Engineering Contradiction:
Improvecomputational speedVSAvoidmemory access time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The input vector is divided into multiple fragments, with each fragment assigned to a different processing unit. This segmentation allows parallel processing of vector elements while reducing the amount of data each processing unit needs to access from off-chip memory, thereby minimizing memory access overhead while maintaining computational speed.

Inventive Principle:
Principle #1Segmentation

2Reliability

If the maximum value of the input vector is determined to prevent overflow, then the reliability is improved, but the memory access overhead increases due to requiring global maximum value

Engineering Contradiction:
Improveoverflow preventionVSAvoidmemory access time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The determination of the maximum value is segmented across processing units. Each processing unit determines the maximum value of its local fragment independently in parallel, eliminating the need for one processing unit to access all vector elements from memory. This approach maintains overflow prevention reliability while significantly reducing memory access overhead.

Inventive Principle:
Principle #1Segmentation

3Loss of time

If the input vector is divided into fragments for parallel processing, then the memory access overhead is reduced, but the device complexity increases due to coordination requirements

Engineering Contradiction:
Improvememory access timeVSAvoidparallel processing coordination
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The input vector is divided into fragments that can be processed independently by different processing units. Each processing unit operates autonomously on its fragment without requiring complex coordination with other units, simplifying the overall system architecture while reducing memory access overhead.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Each processing unit independently determines the maximum value of its own fragment and uses this local maximum for normalization, eliminating the need for complex inter-unit communication and coordination mechanisms.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12561114B2Parallel processing of a Softmax operation by dividing an input vector into a plurality of fragments
Publication Date: 2026.02.24 GRAPHCORE LTD
  • US12561114B2 patent drawing
  • US12561114B2 patent drawing
  • US12561114B2 patent drawing

AI summary

A computer comprising a plurality of processing units, each processing unit having an execution unit and access to computer memory which stores code executable by the execution unit and input values of an input vector to be processed by the code, the code, when executed, configured to access the computer memory to obtain multiple pairs of input values of the input vector, determine a maximum or corrected maximum input value of each pair as a maximum result element, determine and store in a computer memory a maximum or corrected maximum result of each pair of maximum result elements as an approximation to the natural log of the sum of the exponents of the input values and access the computer memory to obtain each input value and apply it to the maximum or corrected maximum result to generate each output value of a Softmax output vector.