AdvancedPhotonSource / tike

Repository for ptychography software
http://tike.readthedocs.io
Other
29 stars 15 forks source link

API: Remove tike.random.randomizer_cp to prevent context on unused devices #295

Closed carterbox closed 10 months ago

carterbox commented 10 months ago

Purpose

Creating a randomization generator opens a CUDA context on the current device, but we don't want that because the default device might not be used.

Approach

Switch back to the functional API which creates a new random state generator on-demand for every function call? Even though this API is deprecated due to less good randomness.

Pre-Merge Checklists

Submitter

Reviewer