LMSouq
general-dev Open

How to tell if tensorflow is using gpu acceleration from inside python shell?

TA
Tamim Addari
1 month ago
3 views
Problem Description
I have installed tensorflow in my ubuntu 16.04 using the second answer [here][1] with ubuntu's builtin apt cuda installation. Now my question is how can I test if tensorflow is really using gpu? I have a gtx 960m gpu. When I `import tensorflow` this is the output I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally Is this output enough to check if tensorflow is using gpu ? [1]: https://devtalk.nvidia.com/default/topic/936429/-solved-tensorflow-with-gpu-in-anaconda-env-ubuntu-16-04-cuda-7-5-cudnn-/

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base