python - 在同一个 GPU 上运行多个 tensorflow 进程不安全吗?

标签 python tensorflow gpu nvidia

我只有一个 GPU(Titan X Pascal,12 GB VRAM),我想在同一个 GPU 上并行训练多个模型。

我尝试将我的模型封装在一个 python 程序(称为 model.py)中,并在 model.py 中包含代码以限制 VRAM 使用(基于 this example)。我能够在我的 GPU 上同时运行多达 3 个 model.py 实例(每个实例占用的 VRAM 略低于 33%)。奇怪的是,当我尝试使用 4 个模型时,我收到了一个错误:

2017-09-10 13:27:43.714908: E tensorflow/stream_executor/cuda/cuda_dnn.cc:371] coul d not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR 2017-09-10 13:27:43.714973: E tensorflow/stream_executor/cuda/cuda_dnn.cc:338] coul d not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM 2017-09-10 13:27:43.714988: F tensorflow/core/kernels/conv_ops.cc:672] Check failed : stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNon fusedAlgo<T>(), &algorithms) Aborted (core dumped)

我后来观察到on the tensorflow Github人们似乎认为每个 GPU 运行多个 tensorflow 进程是不安全的。这是真的吗,是否有解释为什么会这样?为什么我能够在同一个 GPU 上运行 3 个 tensorflow 进程而不是 4 个?

最佳答案

简而言之:是的,在同一个 GPU 上运行多个进程是安全的(截至 2017 年 5 月)。以前这样做是不安全的。

Link to tensorflow source code that confirms this

关于python - 在同一个 GPU 上运行多个 tensorflow 进程不安全吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46145100/

相关文章:

c - 未处理的异常...读取位置访问冲突

python - 如何自动选择和处理/root/facedetect 目录中的每个图像而不是选择特定图像

python - 数据帧 : Drop Down menu to select columns to Display (Bokeh) 的交互图

crash - 在片段着色器中移动变量会使其不起作用或使PC完全崩溃

python - 属性错误 : 'google.protobuf.pyext._message.RepeatedCompositeCo' object has no attribute 'append'

python - 使用 Tensorflow 的 tf.io.gfile.exists 检查文件路径是否存在

ios - 使用 initWithTexture 创建 CIImage

python - 将每对列彼此分开

python - 为什么 Anaconda for Windows 安装不正确?

tensorflow - 将 Tensorboard 与 Tensorflow.js 结合使用