我在多 GPU 机器上遇到了 OOM,因为 TF 2.3 似乎只使用一个 GPU 分配张量。
tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at conv_ops.cc:539 :
Resource exhausted: OOM when allocating tensor with shape[20532,64,48,32]
and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc.
但是当我运行我的代码时,tensorflow 确实可以识别多个 GPU:
Adding visible gpu devices: 0,1,2
我还需要做些什么才能让 TF 使用所有 GPU?