getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.02k stars 65 forks source link

redirect stdout upon import without gpu #329

Closed mvinyard closed 7 months ago

mvinyard commented 10 months ago

I'm wondering if you wouldn't mind redirecting / stashing the stdout message when there is no GPU detected? I'm able to hide the other warnings when via os.environ["KEOPS_VERBOSE"] = "0", though avoidance of the following error message is more difficult without force silencing (to my knowledge). From my perspective, it would be great to include this small edit, if you feel it is acceptable. Thank you for your consideration.

joanglaunes commented 7 months ago

Hi @mvinyard , Very sorry for replying so long time after! There is no problem with this update, and it is merged into main now. Thank you.