MBZ
MBZ

Reputation: 27632

multiple workers on a single machine in distributed TensorFlow

is it possible to launch distributed TensorFlow on a local machine, in a way that each worker has a replica of the model?

if yes, is it possible to assign each agent to utilize only a single CPU core?

Upvotes: 3

Views: 2421

Answers (2)

rrao
rrao

Reputation: 641

Yes it is possible to launch a distributed Tensorflow locally:

Each task typically runs on a different machine, but you can run multiple tasks on the same machine (e.g. to control different GPU devices).

and in such a way that each worker has the same graph:

If you are using more than one graph (created with tf.Graph()) in the same process, you will have to use different sessions for each graph, but each graph can be used in multiple sessions.

As mentioned by in your comments, there is a suggestion of how to try and achieve execution of distributed TF to a single core which involves distributing to different CPUs and then limiting the thread pool to a single thread.

Currently there is no feature that allows the distributed execution of TF graphs to particular cores.

Upvotes: 2

Yao Zhang
Yao Zhang

Reputation: 5781

To your first question, the answer is yes. More details here: https://www.tensorflow.org/versions/r0.9/how_tos/distributed/index.html

For the second question, I'm not sure if Tensorflow has this level of fine-grained control at core-level; but in general the OS will load balance threads on multiple cores.

Note that Tensorflow does have the ability to specify a device at processor level, if you have multiple CPUs/GPUs.

Upvotes: 0

Related Questions