Loading…
Optimizing a Neural Reconstruction Pipeline Using NVIDIA Nsight Developer Tools
NVIDIA Developer BlogTanya Lenz
Summary
NVIDIA Omniverse NuRec reconstructs dynamic 3D environments from camera and lidar sensor data for autonomous vehicle simulation workflows, but high computational demands historically caused long reconstruction times. Engineers used NVIDIA Nsight Systems and Nsight Compute to systematically profile the PyTorch-based training pipeline and optimize its underlying CUDA kernels. Nsight Systems revealed GPU underutilization caused by numerous small kernels and blocking synchronization calls, leading to a fused interpolate kernel that accelerated execution from 4.184 milliseconds to 83.81 microseconds. Profiling with Nsight Compute uncovered resource mismatch in the renderBackward kernel, prompting the team to split it into dedicated camera and lidar implementations with tuned register and shared memory allocations. These adjustments raised kernel occupancy from approximately 15% to between 30% and 50% while decreasing the longest lidar kernel runtime from 31 milliseconds to 18 milliseconds.
Context
NVIDIA Omniverse NuRec converts camera and lidar sensor data into high-fidelity 3D simulation environments for autonomous vehicles and robotics. Reconstructing even short captures initially took from over an hour to several hours due to complex PyTorch loops and demanding CUDA workloads, slowing engineering inspection and debugging cycles.
Approach / What changed
Engineers used NVIDIA Nsight Systems with NVTX annotations to detect GPU underutilization, fuse small kernels inside the interpolate function, and remove blocking cudaStreamSynchronize calls. They then analyzed the renderBackward kernel using NVIDIA Nsight Compute, splitting it into separate implementations for camera and lidar inputs with adjusted register and cache configurations.
Takeaways
- Fusing multiple small kernels and memory operations in the interpolate function into a single kernel reduced its runtime from 4.184 ms to 83.81 us.
- Removing unnecessary cudaStreamSynchronize calls prevented CPU scheduling delays, enabling compact GPU kernel execution without CPU launch-time bottlenecks.
- Splitting renderBackward into dedicated lidar and camera kernels and adjusting register allocations lowered registers per thread and boosted occupancy from ~15% to 30-50%.
Related reading
Develop Lightweight USD Runtimes Faster with AI Agents
Building custom Universal Scene Description (USD) implementations traditionally required adapting large existing codebases to meet specific memory footprints, application binary interfaces (ABIs), or performance requirements. The nanousd-labs project introduces an alternative approach by using AI agents to generate lightweight USD runtimes directly from the Alliance for OpenUSD machine-readable USD Core Specification. Agents parse the specification section by section, write conforming code, and validate output against specification-derived tests under engineer guidance. Written in C++ with a public C API, nanousd functions as an independent data layer that handles parsing, composition, queries, and writing without rendering pixels. This methodology enables developers to regenerate runtimes for varying deployment constraints while maintaining standard compliance through reusable workflows and skill graphs.
Michelle Horton