Tensorflow 2.0 not using all CPU cores

Viewed 603

I am doing some sparse matrix calculation using tensorflow 2.0 on my local machine which has 8 cores. While executing the operation, I can see in the top command that only 1 core out of 8 is being used.

Operation is sparse multiplication

tf.sparse.sparse_dense_matmul(a_tf_sp, b_tf_dense_T)

How can I tell tensorflow 2.0 to use all the cores for this calculation.

1 Answers

Can you define your code inside with tf.device('/cpu:0'): and check?

Related