Add reduced precision light LUT for 2x2/FSD/ND-LAr #309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The light lookup table (LUT) is a large consumer of GPU memory, especially for FSD/ND-LAr (about 19.3 GB in total), and is an area for potentially large reductions in memory usage. I studied methods for reducing the total size while maintaining as much accuracy as possible compared to the original LUTs. See the following presentations for the different methods studied (polynomial fitting, precision reduction, etc.) and some validation on the impact:
For now I went with reducing the precision of the
time_distarray inside the light LUT from single to half precision floats (FP32 to FP16), which results in nearly 2x memory savings. Overall it has no impact on nearly all light waveforms, and a small impact on a few (about ~0.04%) based on a single larnd-sim file.New LUT files were created and stored in the same directory as the rest. Adds new configuration options for using the reduced precision (FP16) light lookup table to save GPU memory when running. The reduced precision is only applied to 'time_dist' and the 'vis' and 't0' arrays remain at FP32.
Added an explicit cast in light_sim.py to account for using the FP16 version of the LUT.