Does TensorFlow view all CPUs of one machine as ONE device?

前端 未结 1 1411
南旧
南旧 2020-12-08 20:50

From the experiments I run, it seems like TensorFlow uses automatically all CPUs on one machine. Furthermore, it seems like TensorFlow refers to all CPUs as /cpu:0.

相关标签:
1条回答
  • 2020-12-08 21:32

    By default all CPUs available to the process are aggregated under cpu:0 device.

    There's answer by mrry here showing how to create logical devices like /cpu:1, /cpu:2

    There doesn't seem to be working functionality to pin logical devices to specific physical cores or be able to use NUMA nodes in tensorflow.

    A possible work-around is to use distributed TensorFlow with multiple processes on one machine and use taskset on Linux to pin specific processes to specific cores

    0 讨论(0)
提交回复
热议问题