Automated GPU Code Generation for Rigid-Body Simulations Using SYMKIN Symbolic Optimizer
摘要
With the increasing need of simulators to compute the dynamics of complex mechanisms, parallel processors are investigated to boost the code execution and respect real-time constraints. However, the programming and code optimization of parallel processors is non-trivial and requires the consideration of several parameters. On Graphic Processing Units (GPU), rules, implementation strategies and considerations are case dependent and have to be considered by programmers. This overload of considerations is discussed in the presented work and a symbolic code generator SYMKIN GPU is proposed to help mechanical engineers to simulate rigid-body dynamics in real-time leveraging GPU parallelization without spending time to optimize the GPU code. The generation process is detailed with the specific case of 2D serial chains parallelized on GPU using NVIDIA CUDA API. Presented as a base foundation for later developments, attention is ported to modularity in order to handle other cases in later contributions such as tree forms and loops. Various options are programmed to satisfy a large range of applications, such as code generation for prototyping or real-time applications with portability of the code to other computers or devices.