GPU Material Point Method Simulation Speedup

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for real-time image simulation, such as the Material Point Method (MPM) on GPUs, face challenges in achieving performance required for real-time applications due to high computational costs and inefficiencies in memory access and synchronization, especially with small to medium particle simulations.

Innovation Solution

The implementation of a unified computational framework that optimizes MPM on single and multi-GPUs by reducing the frequency of non-essential computations, using a free zone scheme for rebuilding mapping, sorting particles to a finer granularity, and employing native atomics for memory access, which results in significant speedup and efficiency improvements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If MPM is implemented on GPU to improve computational performance, then simulation speed is improved, but memory access cost and synchronization overhead increase

Engineering Contradiction:
Improvesimulation speedVSAvoidmemory access time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The simulation domain is divided into a background grid structure that segments the computational space. Particles are mapped to specific grid blocks, allowing localized computation and memory access. This segmentation enables the GPU to process particles in parallel while minimizing global memory access by confining operations to local grid blocks.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A background grid is pre-built before particle simulation begins. The grid structure, including block mappings and neighbor relationships, is constructed in advance to avoid repeated setup overhead during time-stepping. This preliminary action eliminates redundant computation in each simulation step.

Inventive Principle:
Principle #10Preliminary action

2Manufacturing precision

If mapping between particles and grid blocks is rebuilt frequently to maintain accuracy, then simulation precision is improved, but computational overhead increases

Engineering Contradiction:
Improvesimulation accuracyVSAvoidcomputational overhead
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The background grid mapping is rebuilt periodically rather than at every time step. The grid structure is reconstructed when particles have sufficiently moved or when simulation conditions warrant it, reducing the frequency of expensive rebuild operations while maintaining adequate accuracy.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

Instead of fully rebuilding the entire grid mapping structure every step, the implementation performs partial updates only where necessary. Grid blocks that contain particles are updated, while empty or stable regions retain their existing mappings, reducing overall computational overhead.

Inventive Principle:
Principle #16Partial or excessive action

3Loss of time

If particle sorting to fine granularity is performed to optimize memory access, then memory access efficiency is improved, but computation time increases

Engineering Contradiction:
Improvememory access efficiencyVSAvoidcomputation time
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

Particles are sorted not only by spatial position but also by grid block membership, introducing an additional organizational dimension. This multi-dimensional sorting allows particles to be efficiently grouped for memory access patterns that optimize GPU coalesced reads and writes without requiring exhaustive fine-grained sorting.

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

Solution Approach 2:

Sorting is performed locally within each grid block rather than globally across all particles. This local sorting approach optimizes memory access for each block's particles independently, achieving efficient coalesced access patterns while avoiding the computational cost of global sorting.

Inventive Principle:
Principle #3Local quality

4Loss of time

If native atomics are used for memory access to reduce synchronization overhead, then synchronization efficiency is improved, but memory access complexity increases

Engineering Contradiction:
Improvesynchronization overheadVSAvoidmemory access complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

Native atomic operations enable particles to autonomously update shared grid node data without external synchronization coordination. Each particle independently performs atomic additions to grid node momenta and masses, with the hardware automatically handling conflict resolution, eliminating the need for manual synchronization barriers.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11966999B2Real-time simulation using material point method on graphics processing units
Publication Date: 2024.04.23 TENCENT AMERICA LLC
  • US11966999B2 patent drawing
  • US11966999B2 patent drawing
  • US11966999B2 patent drawing

AI summary

An electronic apparatus performs a method of real time simulation of physical visual effect on one or more Graphics Processing Units (GPUs). The method includes a plurality of time steps. Each of the time steps includes: building up a mapping between particles and background grid blocks; sorting the particles to a level of granularity; transferring momenta and masses of the particles to grid nodes on the background grid blocks to compute forces on the grid nodes; updating velocities and resolving collisions from the computed forces on the grid nodes; and applying the updated velocities back to the particles from the grid nodes and advecting the particles. In some embodiments, the frequency of building up and sorting is reduced compared with the frequency of transferring, updating, and applying in the plurality of time steps.