Huge CPU Memory+Time Expense
Not a Photo, a Calculation
Much in common : geometry, light sources, optical physics
Many Applications of ray tracing :
August 2018 : Major Ray Tracing Advance
10 Giga Rays/s |
Ray Trace Dedicated RT Cores
Move part of ray tracing : SM -> RT Core
RTX Platform : Hybrid Rendering
-> real-time photoreal cinematic 3D rendering
Tree of Bounding Boxes (bbox)
OptiX Raytracing Pipeline
Analogous to OpenGL rasterization pipeline:
OptiX makes GPU ray tracing accessible
NVIDIA expertise:
Opticks provides (Yellow):
[1] Turing RTX GPUs
GPU Resident Photons
Thrust: high level C++ access to CUDA
OptiX : single-ray programming model -> line-by-line translation
Volumes -> Boundaries
Ray tracing favors Boundaries
Material/surface boundary : 4 indices
Primitives labelled with unique boundary index
Outside/Inside Unions
dot(normal,rayDir) -> Enter/Exit
Complete Binary Tree, pick between pairs of nearest intersects:
UNION tA < tB | Enter B | Exit B | Miss B |
---|---|---|---|
Enter A | ReturnA | LoopA | ReturnA |
Exit A | ReturnA | ReturnB | ReturnA |
Miss A | ReturnB | ReturnB | ReturnMiss |
Random Aligned Bi-Simulation
Same inputs to Opticks and Geant4:
Common recording into OpticksEvents:
Aligned random consumption, direct comparison:
Bi-simulations of all JUNO solids, with millions of photons
Primary sources of problems
Primary cause : float vs double
Geant4 uses double everywhere, Opticks only sparingly (observed double costing 10x slowdown with RTX)
Conclude
Test Hardware + Software
Hardware
Software
Full JUNO Geometry j1808v5
Production Mode : does the minimum
Multi-Event Running : measure interval and launch
interval : avg time between successive launches, including:
Photon Launch Size : VRAM Limited
NVIDIA Quadro RTX 8000 (48 GB)
400M photons x 112 bytes ~ 45G
Genstep/Hit Copying Overheads
Mostly < 10% Overhead beyond 20M photons
JUNO Full, 400M photons from center | |
---|---|
Geant4 Extrap. | 95,600 s (26 hrs) |
Opticks RTX ON (i) | 58 s |
JUNO Full, 400M photons from center | Speedup | |
---|---|---|
Opticks RTX ON (i) | 58s | x1660 |
Opticks RTX OFF (i) | 275s | x348 |
Geant4 Extrap. | 95,600s (26 hrs) |
5x Speedup from RTX with full JUNO geometry |
100M photon RTX times, avg of 10
Launch times for various geometries | |||
---|---|---|---|
Geometry | Launch (s) | Giga Rays/s | Relative to ana |
JUNO ana | 13.2 | 0.07 | |
JUNO tri.sw | 6.9 | 0.14 | 1.9x |
JUNO tri.hw | 2.2 | 0.45 | 6.0x |
Boxtest ana | 0.59 | 1.7 | |
Boxtest tri.sw | 0.62 | 1.6 | |
Boxtest tri.hw | 0.30 | 3.3 | 1.9x |
JUNO 15k triangles, 132M without instancing
Simple Boxtest geometry gets into ballpark
OptiX Performance Tools and Tricks, David Hart, NVIDIA https://developer.nvidia.com/siggraph/2019/video/sig915-vid
NVIDIA OptiX 7 : Entirely new API
JUNO+Opticks into Production
Geant4+Opticks Integration : Work with Geant4 Collaboration
Expand Community : Webinars, Conference Tutorials ?
Highlights 2019
Opticks : state-of-the-art GPU ray tracing applied to optical photon simulation and integrated with Geant4 to eliminate memory and time bottlenecks.
- Drastic speedup -> better detector understanding -> greater precision
- any simulation limited by optical photons can benefit
https://bitbucket.org/simoncblyth/opticks | code repository |
https://simoncblyth.bitbucket.io | presentations and videos |
https://groups.io/g/opticks | forum/mailing list archive |
email:opticks+subscribe@groups.io | subscribe to mailing list |