skip to main content
10.1145/3648115.3648129acmotherconferencesArticle/Chapter ViewAbstractPublication PagesiwoclConference Proceedingsconference-collections
poster

Ray Tracer based lidar simulation using SYCL

Published:08 April 2024Publication History

ABSTRACT

Lidar plays an increasingly important role in the world [7]. By providing distance information about its surrounding environment to the perception system. For example, in the autonomous vehicle, Lidar can significantly enhance and correct the actions and decisions made by the underlying control or artificial intelligence system to ensure a safer driving experience [4]. However, empirical experimental data alone cannot supply the required insight regarding the propagation of light traveling at the individual photon level.

Simulations can effectively generate the entire path of photons from a laser source to a photon receiver, aiding researchers in understanding light propagation more thoroughly [1]. Ray tracing is a common method used in these simulations, treating light as a collection of photon particles moving linearly through space. This technique is grounded in the foundational principles of light behaviour and can produce high-fidelity, physics-based representations of photon paths. However, as ray tracing is based on the Monte Carlo algorithm, its computational speed is often constrained. In some extreme scenarios, millions or even billions of simulations may be required to achieve a single reliable result.

Ray tracing algorithms are ideally suited for acceleration through parallel processing since the propagation of each ray can be computed separately  [2, 5]. This characteristic makes it an excellent choice for simulating Lidar photons. Additionally, ray tracing algorithms are fairly established in computer graphics, hence, the efforts can focused on parallelizing the Lidar simulation. In contrast to the backward propagation method typically used in ray tracing for rendering, our simulation prioritizes scientific accuracy and adopts a forward strategy. This approach involves propagating rays from the LiDAR source to the detector, ensuring a comprehensive simulation of both direct and indirect illumination to create a global illumination effect.

In the ray tracing algorithm, each ray is independent of the others and can be easily distributed across different computational units. This characteristic allows the algorithm to efficiently utilize all available computational resources. Previous work has been conducted to simulate the room impulse response of time-of-flight imaging using ray tracing with Vulkan RTX_RSim [6], which leverages NVIDIA VKRay. However, this implementation is intended for consumer GPUs, potentially not scalable to multi-GPU and HPC configurations. Furthermore, this approach necessitates dedicated NVIDIA hardware, limiting its portability and future maintenance on specific hardware.

This work showcases the implementation of a ray tracer, for developing a Lidar simulator in SYCL. In this implementation, both the Buffer and Accessor Model and the Unified Shared Memory (USM) model are employed for data management. However, USM is the preferred approach due to its more explicit method of memory access, which offers additional flexibility and control in memory management. Furthermore, the USM implementation with its pointer-based notation provides a more intuitive way to merge the existing C/C++ project and libraries which utilize raw pointers.

In our hardware setup (AMD Ryzen Threadripper 64-Cores, NVIDIA RTX4090, and Intel GPU MAX 1100), The simulation is computed using FP32 (single precision), which provides sufficient accuracy for our simulation. For comparison, both the single-thread C++ and SYCL implementations utilize the same underlying functions for performing ray tracing. The result indicated that SYCL CPU implementation is approximately four times faster than the traditional C++ implementation. Furthermore, by offloading to a GPU, the same SYCL implementation can achieve a performance boost of about 11 times compared to the initial C++ implementation. we will also demonstrate the results of thread utilization, memory bandwidth, and cache level optimization. It should be noted that performance varies significantly with different hardware configurations. Generally, SYCL is highly effective at leveraging the capabilities of modern CPUs, which possess more computational cores.

Our implementation has provided valuable insights into the practicalities of ray tracing in SYCL. We found that while a basic form of ray tracing can be implemented relatively easily, SYCL’s inherent limitations pose challenges for certain data structures and algorithms commonly used in ray tracing. For instance, due to the restriction on dynamic memory allocation within SYCL kernel code, our program operates within a pre-defined memory size. Consequently, certain assumptions were made, such as limiting the number of bounces a ray can make to 50. While this may introduce a theoretical bias, it is a reasonable compromise in practical scenarios, unlikely to significantly impact simulation accuracy, considering the diminishing energy of photons after multiple bounces.

Another challenge was the inability to use recursion in SYCL kernel code. This required us to restructure part of the ray tracing method. For instance, an axis-aligned bounding box (AABB) [3] was utilized for our acceleration structure, storing objects in a binary tree without recursion. The tree’s maximum depth was pre-defined at 50 levels, allowing for a theoretical maximum of 250 objects in a scene.

Although SYCL’s limitations impose theoretical upper bounds on the number of ray bounces and scene objects, these limits are sufficiently high to be negligible for most practical purposes. Moving forward, we plan to apply this photon propagation framework in our next phase of Lidar simulation development. In the future, we will further explore the potential of our implementation and aim to overcome the current limitations, potentially leading to more versatile and robust simulation models. Future research will also focus on improving the efficiency of the algorithm, for example improving the ray coherence with ray reordering techniques.

References

  1. Esteban Egea-Lopez, Jose Maria Molina-Garcia-Pardo, Martine Lienard, and Pierre Degauque. 2021. Opal: An open source ray-tracing propagation simulator for electromagnetic characterization. PLoS ONE 16, 11 (2021), e0260060. https://doi.org/10.1371/journal.pone.0260060Google ScholarGoogle ScholarCross RefCross Ref
  2. Ke Guan, Danping He, Thomas Kürner, and Zhangdui Zhong. 2023. To Know Channels Better: Challenges and Opportunities of Ray Tracing. In 2023 17th European Conference on Antennas and Propagation (EuCAP). 1–3. https://doi.org/10.23919/EuCAP57121.2023.10133671Google ScholarGoogle ScholarCross RefCross Ref
  3. Herman Hansson-Söderlund and Tomas Akenine-Möller. 2023. Tight Bounding Boxes for Voxels and Bricks in a Signed Distance Field Ray Tracer. In Eurographics 2023 - Short Papers, Vahid Babaei and Melina Skouras (Eds.). The Eurographics Association. https://doi.org/10.2312/egs.20231013Google ScholarGoogle ScholarCross RefCross Ref
  4. Dominik Honegger, Lorenz Meier, Petri Tanskanen, and Marc Pollefeys. 2013. An open source and open hardware embedded metric optical flow cmos camera for indoor and outdoor applications. In 2013 IEEE International Conference on Robotics and Automation. IEEE, 1736–1741.Google ScholarGoogle ScholarCross RefCross Ref
  5. José Sasián. 2022. Introduction to Lens Design. Cambridge University Press, Chapter Ray Tracing 5.Google ScholarGoogle Scholar
  6. Peter Thoman, Markus Wippler, Robert Hranitzky, and Thomas Fahringer. [n. d.]. Accelerated Vulkan Room Response Simulation for Time-of-Flight Imaging. ([n. d.]).Google ScholarGoogle Scholar
  7. Qin Zou, Qin Sun, Long Chen, Bu Nie, and Qingquan Li. 2022. A Comparative Analysis of LiDAR SLAM-Based Indoor Navigation for Autonomous Vehicles. IEEE Transactions on Intelligent Transportation Systems 23, 7 (2022), 6907–6921. https://doi.org/10.1109/TITS.2021.3063477Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Other conferences
    IWOCL '24: Proceedings of the 12th International Workshop on OpenCL and SYCL
    April 2024
    124 pages
    ISBN:9798400717901
    DOI:10.1145/3648115

    Copyright © 2024 Owner/Author

    Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 8 April 2024

    Check for updates

    Qualifiers

    • poster
    • Research
    • Refereed limited

    Acceptance Rates

    Overall Acceptance Rate84of152submissions,55%
  • Article Metrics

    • Downloads (Last 12 months)10
    • Downloads (Last 6 weeks)10

    Other Metrics

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format .

View HTML Format