GPU Texture Layouts for Parallel Machine Learning Inference
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional application programming interfaces (APIs) lack the capacity to optimally utilize the bandwidth of graphics processing units (GPUs) for machine learning inference tasks, leading to inefficiencies and bottlenecks, particularly in web browsers where GPU resources are underutilized.
Innovation Solution
The method involves simultaneously rendering a plurality of textures from an input to a machine-learned model, generating shaders based on the texture layout, and processing these textures using a GPU to optimize GPU bandwidth utilization through parallelization, leveraging features like Multi-Render Targets (MRT) in APIs such as WebGL.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional APIs are used for machine learning inference, then ease of operation is maintained, but GPU bandwidth utilization is insufficient
Solution Approach 1:
The patent segments the machine learning model into multiple operators and represents input data as multiple textures instead of a single texture. This segmentation allows parallel processing of different model operators simultaneously, increasing GPU bandwidth utilization without requiring complex custom API implementations.
Solution Approach 2:
The patent transitions from representing input data in a single 2D texture to representing it across multiple textures with different layouts. This dimensional change enables the GPU to process multiple operators in parallel by exploiting the additional texture dimension, thereby improving bandwidth utilization while maintaining standard API simplicity.
2Speed
If multiple textures and shaders are used to increase GPU utilization, then processing speed improves, but device complexity increases
Solution Approach 1:
The patent makes existing GPU rendering APIs multi-functional by using them for both traditional graphics rendering and machine learning inference. Standard rendering pipelines and shaders are repurposed to execute neural network operators, avoiding the need for separate complex inference APIs while achieving parallel processing speeds.
Solution Approach 2:
The system automatically generates appropriate shader code and texture layouts based on the model structure and hardware capabilities. This self-service approach eliminates the need for manual optimization of each operator-shader mapping, reducing system complexity while maintaining high processing speeds through optimized parallel execution.
3Productivity
If conventional single-texture rendering is used, then device complexity is low, but GPU bandwidth utilization is insufficient leading to bottlenecks
Solution Approach 1:
The patent enables continuous utilization of GPU bandwidth by processing multiple model operators in parallel without idle periods. By mapping multiple operators to simultaneously executed shaders operating on multiple textures, the system eliminates the sequential processing gaps that cause GPU underutilization and extend processing time.
Solution Approach 2:
The patent merges multiple operator executions into a single rendering pass by combining multiple textures and shaders. This consolidation allows the GPU to process what would traditionally require sequential operator execution in parallel, maximizing bandwidth utilization and reducing overall processing time.
Data Source
AI summary
Systems and methods of the present disclosure are directed to a method for optimizing utilization of graphics processors for machine learning inference tasks. The method includes simultaneously rendering, by a computing system comprising one or more computing devices, a plurality of textures from an input to a machine-learned model. The method includes generating, by the computing system, a plurality of shaders based at least in part on a layout of the plurality of textures, wherein each of the plurality of shaders corresponds to at least one operator of a plurality of operators of the machine-learned model. The method includes processing, by the computing system using a Graphics Processing Unit (GPU), the plurality of textures with the plurality of shaders to obtain a machine-learning output for the machine-learned model.


