CUDA GPU Computing

Project Description

By targeting complex interactive simulations, SOFA needs to achieve high computational performances. The SofaCUDA plugin extends the SOFA architecture and functionalities to handle GPU-based computations, using the CUDA NVidia toolkit. This plugin is available in SOFA under the LGPL open-source license and can be activated in the project configuration.

See the source code

To get this plugin working, you need to activate the CMake variable PLUGIN_SOFACUDA when configuring SOFA.

Most of the components (C++ classes) used in SOFA simulation are templated by the type of degrees of freedom. By using a “Cuda” template, new methods and functionalities will transparently be used in order to provide an efficient yet generic GPU support. These templates will also rely on hybrid CPU/GPU vector containers allowing to access the data either on the CPU or GPU, for read or write operations. Flags are used internally to execute allocation and transfer operations when necessary.

With this approach, only the few computationally intensive methods that are used during the simulation loop will need to be specialized and rewritten to be executed on GPU. An online documentation of the plugin is available.

Related publications

Back to the plugin list

Related Projects

Back to Top