The SOFA Multicore-GPU plugin has been developed to improve the performance of the simulation in SOFA exploiting parallelism and make it available for commercial products.
The plugin enables the SOFA simulation to mix the CPU and GPU parallelism together to fully exploit the power that each of the these components offers and efficiently manages the multi-CPU and multi-GPU architecture.
All the most computationally intensive parts of the SOFA simulation step are efficiently scaled down to all the available CPU cores on a machine and the more intensive floating point computation can be executed on the GPU.
The Multicore+GPU plugin architecture is fully asynchronous and provides a common interface to create and synchronize CPU and GPU tasks. The CPU tasks can be executed on any CPU worker threads and they can submit other CPU and GPU tasks.
The GPU tasks are queued and executed on the CUDA thread and each task is executed on its own cuda stream. The use of different cuda stream allows the execution cuda kernels and memory copy between CPU and GPU to run asynchronous and overlap.
The CPU utilization can increase up to 90%. For example, the simulations of two testing SOFA scenes running on 6 cores machine are more than two times faster.
Deformable Objects Solver
Any deformable object solver in the scene (e.g. CGLinearSolver, SparseLDLSolver) is executed concurrently.
A new solver has been implemented to exploit CPU parallelism: super nodal LDLt decomposition
The primitive collision tests are executed concurrently
The AABB bounding tree update is executed concurrently for each deformable object.
Each row of the of constraint solver matrix is computed and set up in parallel on the CPU and the most intensive floating point computation runs asynchronous on the GPU.
Some topology changes are performed asynchronous with the physics simulation and as soon as these changes are available they are applied to the next simulation step.
SOFA MultiCore-GPU Simulation in Unity3D
The SOFA multiCore-GPU plugin can be used in Unity3D not only to speed up the simulation but also to decouple the physics simulation loop from the graphics loop. In the picture the Unity3D graphics is running at 87 FPS and the physics simulation at 60 FPS.
- License type: Private
- Status: Ongoing
- Progress: 80%
- TRL: 5