mercredi 21 octobre 2020

How to build single-threaded TensorFlow 2.x from source

While building TensorFlow 2.x (for CPU) from source, what change should I make to force the TensorFlow not to use more than 1 threads? If this is not possible, what specific c++ statements (and in which cpp files) should I change to suppress the generation of multiple threads?

No matter what the number of cpus/cores are, I need 1 thread in total from TensorFlow 2.x.

Use top -H -b -n1 | grep program_name | wc -l to count the total number of threads.

Aucun commentaire:

Enregistrer un commentaire