Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/330.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python停止了切换到GPU上下文的工作_Python_Amazon Web Services_Gpu_Mxnet - Fatal编程技术网

Python停止了切换到GPU上下文的工作

Python停止了切换到GPU上下文的工作,python,amazon-web-services,gpu,mxnet,Python,Amazon Web Services,Gpu,Mxnet,我正在尝试在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 201

我正在尝试在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安装程序运行良好,我编译并运行了
deviceQuery
bandwidthTest
示例应用程序,这些程序按预期输出

EDIT::python崩溃详细信息为我提供了以下信息:

Fault Module Name:  ucrtbase.DLL
我尝试了Cuda Graphis驱动程序:398.44(从Cuda网站为我的gpu和操作系统推荐)到目前为止仍然没有成功


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

我花了将近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  ) 
谢谢