ShaderNN: A Lightweight and Efficient Inference Engine for Real-time Applications on Mobile GPUs.
Jing Xie1,2, Yuzhong Yan2, Abhishek Saxena2
1Department of Electrical and Computer Engineering, University of Maryland at College Park, 8223 Paint Branch Dr, College Park, MD, 20740, USA.
Summary
Shader Neural Network (ShaderNN) is a new OpenGL-based framework for efficient deep learning inference on mobile devices. It minimizes data movement and boosts performance, outperforming existing solutions like TensorFlow-Lite.
Area of Science:
- Computer Science
- Artificial Intelligence
- Mobile Computing
Background:
- Deep neural network inference on mobile devices faces challenges due to limited resources (computation, power, memory).
- Real-time applications require minimized data movement and increased data locality for efficient inference.
- Existing inference engines often involve costly data transfers between CPU and GPU.
Purpose of the Study:
- To propose Shader Neural Network (ShaderNN), a fast and power-efficient OpenGL-based inference framework for mobile devices.
- To address challenges of limited computational capacity, power budget, and data movement in mobile deep learning.
- To enable seamless integration with real-time graphics and image processing applications.
Main Methods:
- Developed ShaderNN using OpenGL, leveraging texture-based input/output for zero-copy integration.
- Utilized fragment shaders for neural network inference operators, particularly for smaller models.
- Implemented a hybrid compute and fragment shader approach with layer-level shader selection for performance optimization.
- Employed OpenGL features like normalization, interpolation, and texture padding to enhance performance.
Main Results:
- ShaderNN demonstrated superior performance compared to TensorFlow-Lite on mobile devices with Qualcomm and MediaTek chips.
- The framework achieved efficient, power-saving inference by minimizing data transfers between CPU and GPU.
- A case study confirmed ShaderNN's usability and seamless integration within an Android media processing application.
Conclusions:
- ShaderNN offers a novel and effective solution for on-device deep learning inference, optimizing for mobile constraints.
- The texture-based, OpenGL-centric approach provides significant performance and efficiency gains.
- ShaderNN is a viable and performant alternative for integrating deep learning into mobile applications.
Related Concept Videos
Parallel Processing
145
The brain processes sensory information rapidly due to parallel processing, which involves sending data across multiple neural pathways at the same time. This method allows the brain to manage various sensory qualities, such as shapes, colors, movements, and locations, all concurrently. For instance, when observing a forest landscape, the brain simultaneously processes the movement of leaves, the shapes of trees, the depth between them, and the various shades of green. This enables a quick and...
145
Accelerating Fluids
1.0K
When a fluid is in constant acceleration, the pressure and buoyant force equations are modified. Suppose a beaker is placed in an elevator accelerating upward with a constant acceleration, a. In the beaker, assume there is a thin cylinder of height h with an infinitesimal cross-sectional area, ΔS.
The motion of the liquid within this infinitesimal cylinder is considered to obtain the pressure difference. Three vertical forces act on this liquid:
The motion of the liquid within this infinitesimal cylinder is considered to obtain the pressure difference. Three vertical forces act on this liquid:
1.0K
Singularity Functions for Shear
120
In structural analysis, singularity functions are crucial in simplifying the representation of shear forces in beams under discontinuous loading. These functions describe discontinuous variations in shear force across a beam with varying loads by using a single mathematical expression, regardless of the complexity of the loading conditions. The singularity functions are derived from creating a free-body diagram of the beam and then making conceptual cuts at specific points to examine the...
120
Statically Indeterminate Problem Solving
360
Statically indeterminate problems are those where statics alone can not determine the internal forces or reactions. Consider a structure comprising two cylindrical rods made of steel and brass. These rods are joined at point B and restrained by rigid supports at points A and C. Now, the reactions at points A and C and the deflection at point B are to be determined. This rod structure is classified as statically indeterminate as the structure has more supports than are necessary for maintaining...
360
Navier–Stokes Equations
422
For incompressible Newtonian fluids, where density remains constant, stresses show a linear relationship with the deformation rate, defined by normal and shear stresses. Normal stresses depend on the pressure exerted on the fluid and the rate of deformation in specific directions, which determines how fluid flows under varying pressures. Shear stresses, on the other hand, act tangentially across fluid layers. They explain how adjacent fluid layers slide relative to one another, connecting...
422
Maxwell-Boltzmann Distribution: Problem Solving
1.4K
Individual molecules in a gas move in random directions, but a gas containing numerous molecules has a predictable distribution of molecular speeds, which is known as the Maxwell-Boltzmann distribution, f(v).
This distribution function f(v) is defined by saying that the expected number N (v1,v2) of particles with speeds between v1 and v2 is given by
This distribution function f(v) is defined by saying that the expected number N (v1,v2) of particles with speeds between v1 and v2 is given by
1.4K


