You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I noticed that initialize is automatically called when the CUDA module is imported. I think it's better to let the user to make that call explicitly: the users will need to setup device and context explicitly any way.
My problem here is that I'm writing a module that could either use GPU or CPU to carry out computation. The GPU code will be called only when the user explicitly choose to do it. However, currently I need to import CUDA module in order to define my functions, which uses some functions and types in the CUDA library. The problem is, since the CUDA driver is initialized upon importing the module, even the user is not intended to use GPU. What's worse is, when the user run it on a node without a GPU device, the code will simply fail upon importing.
The text was updated successfully, but these errors were encountered:
Hi, I noticed that
initialize
is automatically called when theCUDA
module is imported. I think it's better to let the user to make that call explicitly: the users will need to setup device and context explicitly any way.My problem here is that I'm writing a module that could either use GPU or CPU to carry out computation. The GPU code will be called only when the user explicitly choose to do it. However, currently I need to import
CUDA
module in order to define my functions, which uses some functions and types in theCUDA
library. The problem is, since the CUDA driver is initialized upon importing the module, even the user is not intended to use GPU. What's worse is, when the user run it on a node without a GPU device, the code will simply fail upon importing.The text was updated successfully, but these errors were encountered: