B
Boppity Bop
Guest
Boppity Bop Asks: Tensorflow 2.9.1 shows only one CPU available
I found this little code on SO and ran on my Ubuntu 14.02 VM:
output:
I was suspicious abt how little CPU my TF code uses. Now I see why. Question why just one? I have 20 CPU allocated for this VM and
Any ideas how to investigate it?
I found this little code on SO and ran on my Ubuntu 14.02 VM:
Code:
import tensorflow as tf
from tensorflow.python.client import device_lib
print(tf.version.VERSION)
local_device_protos = device_lib.list_local_devices()
print([x.name for x in local_device_protos if x.device_type == 'CPU'])
output:
Code:
2.9.1
['/device:CPU:0']
I was suspicious abt how little CPU my TF code uses. Now I see why. Question why just one? I have 20 CPU allocated for this VM and
htop
shows all of them. But when I run Jupyter notebook with TF code max usage is 160%Any ideas how to investigate it?
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.