Written by Balázs Teréki / Posted at 5/20/21
aiSim raytracing integrates Vulkan API to supercharge validation performance
Simulating the sensor modalities used in automated driving efficiently and accurately is an immense challenge. The best solutions is to rely on GPU-accelerated raytracing techniques and the efficient distribution of tasks. Today, the Vulkan API is the only tool that can support such a system – that’s why we’ve integrated it into aiSim.
Seven years ago, our team set out on a mission to create the world’s first ISO26262 certified automotive-grade simulator for automated driving development. This was when the first versions of aiSim were born, but creating a simulator capable of supporting automotive development was challenging.
Accurately and efficiently simulating all major sensor modalities used in automated driving requires robust hardware and complex code. For example, an automotive LiDAR sensor will emit millions of laser rays each second. Raytracing technology makes simulating this possible, but not automatically efficient.
A crucial element of aiSim 3.0’s efficiency is scheduling the tasks issued by sensors. This functionality is responsible for the execution of accurate and deterministic sensor simulation. In aiSim, scheduling means batching parallel tasks together and executing them on CPUs and GPUs, all the while maintaining synchronization between the other components of aiSim and the SUT (software/system under test, mostly automated driving software). Ensuring platform and vendor independence and scalability between multiple GPUs then created an added layer of complexity.
We decided to integrate the Khronos Group’s Vulkan API to achieve these goals because it is the only current solution to this challenge. Vulkan is a low-level 3D Graphics, Compute and Raytracing API which was built for 3D graphics applications across multiple platforms. Vulkan offers higher performance than its ”predecessor”, OpenGL, by enabling developers to distribute rendering tasks among multiple CPU cores and balancing the workload better between the CPU and GPUs. This is a vital asset, as the simulator relies on GPUs, often several in parallel, to compute accurate sensor simulation and rendering tasks.
LiDAR is one of the several sensor modalities aiSim can simulate. Originally our solution was based on a relatively simple raycast engine that did not integrate very well with Vulkan. We were unable to combine our rendering engine with the raytracing functionalities properly. In addition, the solution was not platform independent.
As noted, an automotive LIDAR sensor casts several million laser rays every second. GPU-accelerated ray tracing is the only way to support this workload. Furthermore, organizing the virtual world (represented by triangle meshes) into acceleration structures is crucial to achieving real-time performance. By using the new VK_KHR_acceleration_structure and VK_KHR_ray_tracing_pipeline extensions, our code base became much cleaner and homogeneous. Also, access to the different geometry and material data is more convenient because now aiSim can share memory resources and shader programs. This means that integrating Vulkan raytracing not only improved simulation performance but helped us distribute tasks to the available hardware resources more efficiently.
We believe openness and compatibility are needed to create the best simulations solutions. This is why the aiSim 3.0 simulation platform has numerous APIs and interfaces. These allow our partners to connect their sensor models with aiSim and access the accurate and efficient rendering and raytracing engines through high-level interfaces. In the automotive industry, the simultation of radar, LiDAR and ultrasonic sensors requires the extensive use of raytracing. The solutions above are another example of why aiSim is equipped to handle the heaviest demands of automated driving development.
Industry trends have made it clear that simulation will play a crucial role in verifying and validating automated driving systems. aiSim has been built around this very principle and offers a complete set of features honed to supporting end-to-end virtual validation. To learn more about the history, key features, and specifications of aiSim, click here.