An experience with PyCUDA: Refactoring an existing implementation of a ray-surface intersection algorithm

05/03/2023
by   Raymond Leung, et al.
0

This article is a sequel to "GPU implementation of a ray-surface intersection algorithm in CUDA" (arXiv:2209.02878) [1]. Its main focus is PyCUDA which represents a Python scripting approach to GPU run-time code generation in the Compute Unified Device Architecture (CUDA) framework. It accompanies the open-source code distributed in GitHub which provides a PyCUDA implementation of a GPU-based line-segment, surface-triangle intersection test. The objective is to share a PyCUDA learning experience with people who are new to PyCUDA. Using the existing CUDA code and foundation from [1] as the starting point, we document the key changes made to facilitate a transition to PyCUDA. As the CUDA source for the ray-surface intersection test contains both host and device code and uses multiple kernel functions, these notes offer a substantive example and real-world perspective of what it is like to utilize PyCUDA. It delves into custom data structures such as binary radix tree and highlights some possible pitfalls. The case studies present a debugging strategy which may be used to examine complex C structures in device memory using standard Python tools without the CUDA-GDB debugger.

READ FULL TEXT

page 2

page 4

page 7

page 8

page 10

page 11

research
09/07/2022

GPU implementation of a ray-surface intersection algorithm in CUDA (Compute Unified Device Architecture)

These notes accompany the open-source code published in GitHub which imp...
research
08/07/2022

A New Approach to Line-Sphere and Line-Quadrics Intersection Detection and Computation

Line intersection with convex and un-convex polygons or polyhedron algor...
research
12/30/2019

Adding Custom Intersectors to the C++ Ray Tracing Template Library Visionaray

Most ray tracing libraries allow the user to provide custom functionalit...
research
11/08/2018

Fast, High Precision Ray/Fiber Intersection using Tight, Disjoint Bounding Volumes

Analyzing and identifying the shortcomings of current subdivision method...
research
12/18/2020

Proceduray – A light-weight engine for procedural primitive ray tracing

We introduce Proceduray, an engine for real-time ray tracing of procedur...
research
05/17/2023

OpenLB User Guide: Associated with Release 1.6 of the Code

OpenLB is an object-oriented implementation of LBM. It is the first impl...
research
09/05/2016

Volume Raycasting mit OpenCL

This German paper was written entirely at the University of Duisburg-Ess...

Please sign up or login with your details

Forgot password? Click here to reset