Is there a way to check if prefer_gpu
has been called?
#11648
-
Trying to understand how we might know if a user using spacy has called |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @nikita-galileo , there's no variable to check. Instead, you can try the |
Beta Was this translation helpful? Give feedback.
Hi @nikita-galileo , there's no variable to check. Instead, you can try the
thinc.api.get_current_ops
function and check if the class is not an instance ofNumpyOps
. The best practice though is to just callprefer_gpu
whenever necessary (or if you're uncertain).