Irregular Tensor Conversion for GPU Sequence Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current GPU algorithms are limited to processing regular tensor data structures, leading to inefficient sequence processing tasks, which are often transferred to the CPU for processing, resulting in low efficiency and user experience issues due to cumbersome data transfer between CPU and GPU.

Innovation Solution

A method to convert irregular tensor data structures into regular tensor data structures based on tensor dimensions and element information, allowing GPUs to process sequences directly without the need for CPU intervention, optimizing GPU processing efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If GPU processes sequence data with irregular tensor data structure, then processing efficiency is improved, but GPU algorithm compatibility deteriorates

Engineering Contradiction:
Improvesequence processing efficiencyVSAvoidGPU algorithm compatibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent transforms the data structure parameters from irregular to regular format, enabling GPU algorithms to process sequence data efficiently while maintaining algorithm compatibility. Specifically, it converts ragged tensor representations into padded tensors with fixed dimensions, allowing standard GPU operations to be applied without modification.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces an intermediate data structure conversion layer that translates irregular sequence data into a regular tensor format suitable for GPU processing. This intermediary transformation enables the GPU to handle diverse sequence lengths without requiring algorithmic changes, bridging the gap between data irregularity and algorithm rigidity.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If CPU processes sequence data, then data structure flexibility is maintained, but processing speed deteriorates

Engineering Contradiction:
Improvedata structure flexibilityVSAvoidprocessing speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

The patent performs data structure conversion in advance before transferring data to the GPU. By pre-processing irregular sequences into regular tensors on the CPU side, the system maintains data structure flexibility during preparation while enabling high-speed GPU processing afterward, eliminating the need for slow CPU-based sequence processing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces the mechanical CPU processing approach with a GPU-based parallel processing system. By converting data to a GPU-compatible regular tensor format, the system substitutes sequential CPU operations with massively parallel GPU operations, achieving both speed improvement and maintained flexibility through the conversion mechanism.

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

3Productivity

If data is transferred between CPU and GPU, then processing capability is optimized, but data contamination risk increases

Engineering Contradiction:
Improveprocessing capabilityVSAvoiddata contamination risk
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent performs complete data structure conversion before data transfer between CPU and GPU. By finalizing the tensor format in advance, the system eliminates the need for repeated data transformations during processing, thereby reducing data transfer operations and minimizing the risk of data contamination or corruption during transmission.

Inventive Principle:
Principle #10Preliminary action

4Measurement precision

If irregular tensor data structure is used, then sequence representation accuracy is improved, but processing complexity increases

Engineering Contradiction:
Improvesequence representation accuracyVSAvoidprocessing complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent transforms the tensor data structure parameters from irregular to regular format through systematic conversion. This parameter change maintains the representational accuracy of sequences by preserving element relationships while adopting fixed-dimensional structures that simplify processing operations and reduce computational complexity.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP4050552B1Method and apparatus for sequence processing, and storage medium
Publication Date: 2024.11.13 BEIJING XIAOMI MOBILE SOFTWARE CO LTD
  • EP4050552B1 patent drawingFigure 1~2
  • EP4050552B1 patent drawingFigure 3~4
  • EP4050552B1 patent drawingFigure 5

AI summary

A sequence processing method can be applied to a graphics processor (GPU), and include: determining a sequence to be processed, which has an irregular tensor data structure; determining data structure information in the sequence to be processed, where the data structure information includes tensor dimensions and element information in tensors of each dimension; converting the irregular tensor data structure into a regular tensor data structure based on the tensor dimension and the element information; and processing the sequence to be processed based on the regular tensor data structure. The sequence with irregular tensor data structure can be processed on the GPU, so as to optimize the ability of GPU to process the sequence, speed up the processing process, and improve the efficiency of GPU to process the sequence.