mmuckley / torchkbnufft

A high-level, easy-to-deploy non-uniform Fast Fourier Transform in PyTorch.
https://torchkbnufft.readthedocs.io/
MIT License
201 stars 44 forks source link

Allow user control of threading #74

Open mmuckley opened 1 year ago

mmuckley commented 1 year ago

We should have some parameter that the user can pass that controls the number of threads used for a NUFFT. Presently we discover the number of threads on the system here. What this feature proposes is to pass in num_threads as a parameter. By default it can be None, which would revert to the current behavior.

This may address issues with using NUFFTs in dataloaders with multiple workers as seen in #73.