我正在尝试在TensorFlow中构建一个大型的CNN,并打算在多GPU系统上运行它。我采用了“塔”系统,将批次分为两个GPU,同时保持变量和其他计算在CPU上。我的系统有32GB的内存,但当我运行我的代码时,出现以下错误:
E tensorflow/stream_executor/cuda/cuda_driver.cc:924] failed to alloc 17179869184 bytes on host: CUDA_ERROR_OUT_OF_MEMORY
W ./tensorflow/core/common_runtime/gpu/pool_allocator.h:195] could not allocate pinned host memory of size: 17179869184
Killed
我看到代码能够工作(虽然非常非常慢),如果我将CUDA设备隐藏到TensorFlow中,因此它不使用cudaMallocHost()...谢谢您的时间。
sess.run(tf.global_variables_initializer())
之后立即出现了错误。 - Alexandre Vieira