http://qs321.pair.com?node_id=11135430


in reply to Inline::CUDA : looking for feedback

This is great! I look forward to giving it a try. One thing that came to mind is that it might be nice within the library itself to detect the presence of a GPU. That way code using this module can easily shift to non-GPU code if needed. Surely this can be done by the programmer using this, but I wonder if having the ability as a feature might add some additional convenience since it's such a common pattern?
  • Comment on Re: Inline::CUDA : looking for feedback

Replies are listed 'Best First'.
Re^2: Inline::CUDA : looking for feedback
by bliako (Monsignor) on Jul 29, 2021 at 10:12 UTC

    Yes, the script scripts/nvidia-ml-test.pl is a base for what you are suggesting. Unfortunately nvidia::ml, which adds this functionality, fails to install and I have filed a bug and a working solution. Which is unlikely to be incorporated as this module have not been updated since 2013.

    So, ideally it would be user's responsibility to check if GPU is present and what to do, but a high-level sub can be added to the API for checking if GPU exists, if it is suitable, etc.