Does TensorFlow view all processors of the same machine as ONE?

From the experiments I run, it seems that TensorFlow automatically uses all processors on the same machine. Also, it seems that TensorFlow refers to all CPUs as / cpu: 0.

Is it right that only different graphic processors of one machine are indexed and considered as separate devices, but all processors on one machine are considered as one device?

Is there a way a machine can have multiple processors looking at it from a TensorFlows perspective?

+6
source share
1 answer

By default, all processors available for a process are aggregated in a cpu:0 device.

In response to mrry , it shows how to create logical devices like /cpu:1 , /cpu:2

It seems that there is no functionality for connecting logical devices to specific physical kernels or the possibility of using NUMA nodes in a tensor stream.

A possible job is to use distributed TensorFlow with multiple processes on the same machine and use Linux taskset to bind specific processes to specific kernels.

+13
source

All Articles