FHof / torchquad

Multidimensional numerical integration on the GPU using PyTorch
https://www.esa.int/gsp/ACT/open_source/torchquad/
GNU General Public License v3.0
0 stars 0 forks source link

RNG: Add an option to save and restore the state with PyTorch #42

Closed FHof closed 2 years ago

FHof commented 2 years ago

With this the user can change the RNG seed in a VEGAS integrand without changing the sample points. Measurements showed that the uniform function is ca. 4 µs slower with CPU and 30 µs slower with CUDA when the state is saved and restored, so I disabled the option by default.

Alternatively the user can maintain a separate state by modifying the integrand function.