【问题标题】:Python Stopped Working on switiching to GPU contextPython 停止切换到 GPU 上下文
【发布时间】:2018-08-25 09:28:12
【问题描述】:

我正在尝试在 AWS 上设置我的机器学习环境,如下所示:-

OS: windows server 2012 r2 , 64 bit
instance: p2.xlarge
GPU : Tesla K80 series
CUDA: 9.2.148
Graphis driver: 398.26 (installed by cuda toolkit)
python : 3.5 ( tested using 2.7.15 as well) ,64 bit
IDE: Pycharm Community 2018.2, 64 bit
mxnet librabry: mxnet-cu92

现在当我运行以下代码时:

import mxnet as mx
from mxnet import nd
mx.random.seed(1)
z = nd.ones(shape=(3,3), ctx=mx.cpu())
print(z)

它工作正常,但是当我更改 ctx=mx.gpu() 或 ctx=mx.gpu(0) 时,我得到错误 python 停止工作。

cuda 设置工作正常我编译并运行了 deviceQuerybandwidthTest 示例应用程序,这些都按预期输出。

EDIT:: python crash details 给了我以下信息:

Fault Module Name:  ucrtbase.DLL

我尝试使用 Cuda Graphis 驱动程序:398.44(从 cuda 网站为我的 gpu 和 os 推荐)到目前为止仍然没有运气。

有解决这个问题的办法吗?

【问题讨论】:

    标签: python amazon-web-services gpu mxnet


    【解决方案1】:

    我花了将近 3 天终于得到了解决方案,是 mxnet 库引起了问题。在尝试了不同的 cuda 工具包和 mxnet 库之后,以下组合对我有用:-

    1) Cuda Toolkit - 9.2
       Mxnet lbrary : mxnet-cu92 version 1.2.0b20180525
       (Failing for most of the recent versions ) 
    2)  Cuda Toolkit - 8.0
       Mxnet lbrary : mxnet-cu80 version 0.11.0
       (Failing for most of the recent versions  ) 
    

    谢谢

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-17
      • 2021-04-07
      • 1970-01-01
      • 2011-07-23
      • 2017-12-01
      相关资源
      最近更新 更多