Tensor Address Computation Using Register-Based Multi-Dimensional Indexing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing technologies face challenges in efficiently processing multi-dimensional tensors due to the significant computational overhead required for handling nested loop structures, particularly in determining memory addresses, which degrades processor performance.

Innovation Solution

The use of registers to maintain architectural status sets, including loop bound values, current loop index variables, dimension multipliers, and program counter values, allows for efficient computation of memory addresses within nested loops, reducing the need for extensive branch instructions and integer arithmetic operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If traditional nested loop structures are used to access multi-dimensional tensors, then the code is easy to write and understand, but the computational overhead is significant due to extensive branch instructions and integer arithmetic operations

Engineering Contradiction:
ImproveEase of writing and understanding nested loop codeVSAvoidProcessor performance
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent replaces the mechanical execution of nested loop control structures (branch instructions, integer arithmetic operations for index management) with a hardware-based tensor index register system. The processor includes specialized tensor index registers that automatically manage multi-dimensional indexing without requiring software-level nested loops, thereby eliminating the computational overhead of traditional loop control while preserving the ability to access multi-dimensional tensor data structures.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Adaptability or versatility

If extensive branch instructions and integer arithmetic operations are used to compute memory addresses in nested loops, then general-purpose processors can handle various control flows, but the number of computational cycles increases significantly

Engineering Contradiction:
ImproveAbility to handle various control flowsVSAvoidNumber of computational cycles
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent segments the address computation function into dedicated hardware components: tensor index registers for storing indices along different dimensions, dimension size registers for storing the size of each dimension, and a separate address computation unit. This segmentation allows the system to compute tensor element addresses efficiently without requiring general-purpose branch instructions and integer arithmetic, thereby reducing computational cycles while maintaining the ability to handle various tensor access patterns.

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If traditional memory address computation methods are used, then compatibility with existing processors is maintained, but processor bandwidth is limited due to sequential processing requirements

Engineering Contradiction:
ImproveCompatibility with existing processorsVSAvoidProcessor bandwidth
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent implements a nested register structure where tensor index registers are organized hierarchically to represent different dimensions of a tensor. Each level of nesting corresponds to a dimension, with registers for outer dimensions containing indices that are multiplied by their respective dimension sizes and added to the base address, while inner dimension registers provide finer-grained indexing. This nested structure enables efficient computation of addresses for multi-dimensional tensors while maintaining compatibility with existing processor architectures.

Inventive Principle:
Principle #7Nested doll (Nesting)

Data Source

PatentEP3226121B1Accessing data in multi-dimensional tensors
Publication Date: 2026.04.01 GOOGLE LLC
  • EP3226121B1 patent drawingFigure 1
  • EP3226121B1 patent drawingFigure 2A
  • EP3226121B1 patent drawingFigure 2B

AI summary

Methods, systems, and apparatus, including an apparatus for processing an instruction for accessing a N-dimensional tensor, the apparatus including multiple tensor index elements and multiple dimension multiplier elements, where each of the dimension multiplier elements has a corresponding tensor index element. The apparatus includes one or more processors configured to obtain an instruction to access a particular element of a N-dimensional tensor, where the N-dimensional tensor has multiple elements arranged across each of the N dimensions, and where N is an integer that is equal to or greater than one; determine, using one or more tensor index elements of the multiple tensor index elements and one or more dimension multiplier elements of the multiple dimension multiplier elements, an address of the particular element; and output data indicating the determined address for accessing the particular element of the N-dimensional tensor.