No, I don’t think “open CUDA library” is enough to tell, because different nodes of the graph may be on different devices.
When using tensorflow2:
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
For tensorflow1, to find out which device is used, you can enable log device placement like this:
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
Check your console for this type of output.

Related Posts:
- How to find which version of TensorFlow is installed in my system?
- Import error when trying to import tensorflow with gpu
- Install pip for python 3.5
- ImportError: No module named tensorflow
- ImportError: No module named ‘tensorflow.python’
- error: command ‘gcc’ failed with exit status 1 while installing eventlet
- error: command ‘gcc’ failed with exit status 1 while installing eventlet
- How to install python3 version of package via pip on Ubuntu?
- Could not find a version that satisfies the requirement tensorflow
- Could not find a version that satisfies the requirement tensorflow
- Convert a tensor to numpy array in Tensorflow?
- Convert a tensor to numpy array in Tensorflow?
- Convert a tensor to numpy array in Tensorflow?
- Tensorflow: why ‘pip uninstall tensorflow’ cannot find tensorflow
- Installing tensorflow with anaconda in windows
- Cannot uninstall Tensorflow
- error: Failed to load the native TensorFlow runtime
- Can I run Keras model on gpu?
- What is the difference between sparse_categorical_crossentropy and categorical_crossentropy?
- using pip3: module “importlib._bootstrap” has no attribute “SourceFileLoader”
- pip3: command not found
- ImportError: libcuda.so.1: cannot open shared object file
- LSTM Keras input shape confusion
- What is the difference between np.mean and tf.reduce_mean?
- Failed to load the native TensorFlow runtime – TensorFlow 2.1
- No Module Named ‘_pywrap_tensorflow_internal’
- TensorFlow: Blas GEMM launch failed
- What’s the difference between scikit-learn and tensorflow? Is it possible to use them together?
- Does Numpy automatically detect and use GPU?
- Error: OOM when allocating tensor with shape
- tar: Unrecognized archive format error when trying to unpack flower_photos.tgz, TF tutorials on OSX
- pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/
- can’t open tensorboard 0.0.0.0:6006 or localhost:6006
- How to fix “AttributeError: module ‘tensorflow’ has no attribute ‘get_default_graph'”?
- ImportError: No module named ‘xlrd’
- No module named ‘openpyxl’ – Python 3.4 – Ubuntu
- How to Install pip for python 3.7 on Ubuntu 18?
- Tensorflow 2.0 – AttributeError: module ‘tensorflow’ has no attribute ‘Session’
- No module named ‘tqdm’
- No module named django but it is installed
- What is the difference between ‘SAME’ and ‘VALID’ padding in tf.nn.max_pool of tensorflow?
- How to completely uninstall python 2.7.13 on Ubuntu 16.04
- RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
- How to change python version in Anaconda?
- AttributeError: ‘module’ object has no attribute ‘main’ for tf.app.run()
- How to downgrade tensorflow, multiple versions possible?
- SyntaxError: unexpected EOF while parsing
- How do I lowercase a string in Python?
- How do I copy a file in Python?
- How can I reverse a list in Python?
- Manually raising (throwing) an exception in Python
- How do I copy a file in Python?
- can’t multiply sequence by non-int of type ‘float’
- Difference between del, remove, and pop on lists
- How can I reverse a list in Python?
- How to use the pass statement
- How to use filter, map, and reduce in Python 3
- What does enumerate() mean?
- Searching the student-t distribution table for values using python
- How to declare an array in Python?
- Does Python have a ternary conditional operator?
- Use Gif Logo For Loading Screen In Kivy
- Praw & Discord.py: The bot keep sending the same meme. I want the bot to send different meme whenever it is asked
- Pig Latin Translator
- What is the difference between Python’s list methods append and extend?
- How can I make a time delay in Python? [duplicate]
- Python – TypeError: ‘int’ object is not iterable
- TypeError: ‘int’ object is not subscriptable
- sphinx.ext.autodoc: Keeping names of constants in signature
- are there dictionaries in javascript like python?
- How do you round UP a number?
- Understanding slice notation
- Iterating over dictionaries using ‘for’ loops
- How to define a two-dimensional array?
- how to sort pandas dataframe from one column
- Why am I seeing “TypeError: string indices must be integers”?
- How do you round UP a number?
- Understanding slice notation
- TypeError: only integer scalar arrays can be converted to a scalar index with 1D numpy indices array
- How do I update\upgrade pip itself from inside my virtual environment?
- How to open a file using the open with statement
- How to emulate a do-while loop?
- How do I update\upgrade pip itself from inside my virtual environment?
- How to comment out a block of code in Python [duplicate]
- Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
- Using “with open() as file” method, how to write more than once? [duplicate]
- TypeError: list indices must be integers or slices, not str
- Why there is no do while loop in python
- How do I get a substring of a string in Python?
- How do I sort a dictionary by value?
- ImportError: DLL load failed: The specified module could not be found
- How do I sort a dictionary by value?
- How to prettyprint a JSON file?
- What does the “yield” keyword do?
- ImportError: DLL load failed: The specified module could not be found
- Replacements for switch statement in Python?
- How to install pip with Python 3?
- What is the difference between rw+ and r+
- What does ** (double star/asterisk) and * (star/asterisk) do for parameters?
- Renaming column names in Pandas