0

I am trying to run my CNN model using multiple CPUs, but it doesn't allow me to specify number of CPU I want to use.

What I have done so far

#option 1
#session_conf = tf.ConfigProto(
#      intra_op_parallelism_threads=8,
#      inter_op_parallelism_threads=8)
#session = tf.Session(config=session_conf)

#option 2
#config = tf.ConfigProto()
#config.intra_op_parallelism_threads = 8
#config.inter_op_parallelism_threads = 8
#session = tf.Session(config=config)

#option 3
#config = tf.ConfigProto(device_count={'CPU': 16})
#session = tf.Session(config=config)

#option 4
config = tf.ConfigProto(device_count={'GPU':0, 'CPU':16})
session = tf.Session(config=config)

session.run(tf.global_variables_initializer())

With above all 4 options, it only used single CPU.

top enter image description here

How can I parallelize this job on 16 CPUs?

mr_swap
  • 339
  • 1
  • 2
  • 10
  • Maybe its help. https://stackoverflow.com/questions/38836269/does-tensorflow-view-all-cpus-of-one-machine-as-one-device – thmnd Oct 01 '19 at 15:31
  • Thanks @thmnd ! I am working on it! I will let you know if I solve my problem or not. – mr_swap Oct 02 '19 at 09:33

0 Answers0