Neural Network Forward Computation Using GPU Texture Storage

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing forward computation of neural networks in GPUs is inefficient due to the linear storage of buffers in internal memory, leading to prolonged data reading and storage times.

Innovation Solution

Implementing a method that uses texture storage structures, such as RGBA-channel 3D or 2D texture storage, to store input and weight data separately, allowing the GPU to access and process data more efficiently by using texture coordinates as indexes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If buffer structure is used for data storage in GPU, then data can be stored in internal memory, but the linear storage structure causes prolonged data reading and storage time

Engineering Contradiction:
Improvedata storage capacityVSAvoiddata reading and storage time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent transforms the linear storage structure into a two-dimensional texture storage structure by introducing texture coordinates (u, v) as indexing mechanisms. Instead of accessing data sequentially through linear buffers, the GPU can access data elements through 2D texture coordinates, enabling parallel access patterns and significantly reducing data retrieval time during forward propagation computations.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Ease of manufacture

If linear buffer storage is used, then implementation is simple, but GPU data access efficiency is low

Engineering Contradiction:
Improveimplementation simplicityVSAvoidforward computation efficiency
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent changes the storage parameters from linear buffer indexing to 2D texture coordinate indexing. By mapping data elements to texture coordinates and utilizing the texture storage structure's inherent 2D organization, the system achieves faster GPU data access while maintaining implementation feasibility through standard OpenGL texture operations.

Inventive Principle:
Principle #35Parameter changes

3Speed

If texture storage structure is used, then data access speed increases, but storage structure complexity increases

Engineering Contradiction:
Improvedata access speedVSAvoidstorage structure complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent leverages the universal texture storage structure that serves multiple functions: it provides fast 2D data access for forward propagation, supports various data layouts through texture coordinate mapping, and can be implemented using standard OpenGL APIs. This multi-functionality reduces the need for specialized storage structures while achieving high data access speeds.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS12412080B2Method and apparatus for forward computation of neural network, and computer-readable storage medium
Publication Date: 2025.09.09 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US12412080B2 patent drawing
  • US12412080B2 patent drawing
  • US12412080B2 patent drawing

AI summary

A method and an apparatus for forward computation of a neural network are provided. The method includes: obtaining input data and weight data of at least one data processing layer; storing the input data by using a first texture storage structure to obtain first texture data; storing the weight data by using a second texture storage structure to obtain second texture data; and performing data processing of the at least one data processing layer based on the first texture data and the second texture data, to obtain output data of the at least one data processing layer. For the at least one data processing layer in the neural network, the input data and the weight data are respectively stored in corresponding texture storage structures.