在Windows 8上使用device = gpu导入theano(0.6)(和Visual Studios 12.0)

泽汉

当我尝试将Theano与GPU设备配合使用时(在CPU上工作正常),我遇到了编译问题。我遇到的问题与此处已报告的问题几乎完全相同,但是遵循提供的解决方案对我不起作用。按照原始解决方案,我可以验证pycuda是否已成功安装,但是导入theano仍会引发相同的错误:

c:\python\python27\include\pymath.h(22): warning: dllexport/dllimport conflict with "round"
c:\program files\nvidia gpu computing toolkit\cuda\v6.5\include\math_functions.h(2455): here; dllimport/dllexport dropped

mod.cu(954): warning: statement is unreachable
mod.cu(1114): error: namespace "std" has no member "min"

... *lots more of the same error at different lines* ...

mod.cu(4604): error: namespace "std" has no member "min"

31 errors detected in the compilation of "C:/Users/Zehan/AppData/Local/Temp/tmpxft_0000317c_00000000-10_mod.cpp1.ii".
ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: ('nvcc return status', 2, 'for cmd', 'nvcc -shared -g -O3 --compiler-bindir C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin -Xlinker /DEBUG -m32 -Xcompiler -LC:\\Python\\Python27\\libs,-DCUDA_NDARRAY_CUH=d67f7c8a21306c67152a70a88a837011,/Zi,/MD -IC:\\Python\\Python27\\lib\\site-packages\\theano\\sandbox\\cuda -IC:\\Python\\Python27\\lib\\site-packages\\numpy\\core\\include -IC:\\Python\\Python27\\include -o C:\\Users\\Zehan\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.8-32\\cuda_ndarray\\cuda_ndarray.pyd mod.cu -LC:\\Python\\Python27\\libs -LNone\\lib -LNone\\lib64 -LC:\\Python\\Python27 -lpython27 -lcublas -lcudart')

我安装了Python 2.7.8 32bit和MinGW以及CUDA 6.5。我正在使用以下.theanorc配置:

[global]
device = gpu
floatX = float32

[nvcc]
compiler_bindir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin

为了使pycuda示例正常工作,我必须在C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin用户路径中添加Visual Studio 12.0 尽管使用了Visual Studio 10命令提示符来构建pycuda,但由于某种原因,它不能与Visual Studio 10.0一起使用。

顺便说一句,如果我尝试compiler_bindir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin,我会收到一条错误消息,指出Visual Studio版本不好:

nvcc fatal: nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2010, 2012, and 2013 are supported

(我安装了Visual Studio Express 2010和2013)

我了解Windows对Theano + GPU的支持仍处于试验阶段,但似乎确实对某些人有效。关于下一步尝试有什么建议吗?

泽汉

我在这里找到了一些修复方法

从本质上讲,它需要在中找到cuda_ndarray.cuh文件<install-dir>/andbox\cuda并添加#include <algorithm>

它仍然发出警告warning C4273: 'round' : inconsistent dll linkage

根据此报告的问题是由于Python和CUDA之间存在冲突,并且两者都提供了round功能。可以通过在与CUDA链接时定义宏HAVE_ROUND来告诉Python不要尝试重新定义回合来解决此问题。

不知道这是否是适用于每个人的常规修补程序,但似乎对我有用-就使我能够将GPU与theano一起使用而言。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

在启用GPU的Windows 8上安装theano

来自分类Dev

CefSharp.Wpf - 应用程序在不安装 Visual Studios 的情况下无法在 Windows 7 上运行

来自分类Dev

Visual Studios,在 C 代码中使用预编译头文件

来自分类Dev

无法在 kali 上安装 libpng12-0

来自分类Dev

绘制夜间的拆分日期/时间(而不是0-24小时,12-24和0-12)

来自分类Dev

Windows 7上导入Theano的G ++错误

来自分类Dev

Windows 7上导入Theano的G ++错误

来自分类Dev

使用GPU导入theano时出错

来自分类Dev

使用GPU导入theano时出错

来自分类Dev

'utf-8'编解码器无法解码LZ4和Python 3.x上位置12的字节0xf0

来自分类Dev

npm ci在Windows上输出角度8和节点12的错误:node-gyp重建

来自分类Dev

Ubuntu可以在Windows 8平板电脑和可转换版本上运行吗?(戴尔XPS 12)

来自分类Dev

Windows 8(8.1)中的jQuery Ajax readystate 0 status 0仅在Chrome上

来自分类Dev

selectionModel和selectedRows使用了选定的行,但PyQt4.QtCore.QModelIndex对象位于0x12xxxxxx

来自分类Dev

selectionModel和selectedRows使用了选定的行,但PyQt4.QtCore.QModelIndex对象位于0x12xxxxxx

来自分类Dev

Ubuntu上的JetBrains Intellij IDEA和Android Studios CPU使用率错误

来自分类Dev

C ++ OpenGL glCreateProgram在Windows上返回0

来自分类Dev

Windows上的/ dev / ttyACM0?

来自分类Dev

C ++ OpenGL glCreateProgram在Windows上返回0

来自分类Dev

为什么Visual Studios中缺少Visual Studio 2012-Windows XP(v110_xp)的选项?

来自分类Dev

来自iMac的Maxtor 6B250S0可安装在Windows 10 USB上

来自分类Dev

如何使用Visual C#访问Visual Studios中的嵌入式资源?

来自分类Dev

如何在Kubernetes上使用--device / dev / video0?

来自分类Dev

由于错误,c++ 代码不会在 Visual Studios 上运行,但未显示任何错误

来自分类Dev

如何使用React和Webpack设置Babel 6 Stage 0

来自分类Dev

为什么是Array.new(10){| e | e = e + 2}产生[0 2 4 6 8 10 12 14 16 18]?

来自分类Dev

USB存储设备不可用?(在Windows和Linux上为0kb)

来自分类Dev

Windows 7上的PID 0和PID 4之间存在什么进程(如果有)?

来自分类Dev

如何在Visual Studios发布生成脚本中使用生成时间戳

Related 相关文章

  1. 1

    在启用GPU的Windows 8上安装theano

  2. 2

    CefSharp.Wpf - 应用程序在不安装 Visual Studios 的情况下无法在 Windows 7 上运行

  3. 3

    Visual Studios,在 C 代码中使用预编译头文件

  4. 4

    无法在 kali 上安装 libpng12-0

  5. 5

    绘制夜间的拆分日期/时间(而不是0-24小时,12-24和0-12)

  6. 6

    Windows 7上导入Theano的G ++错误

  7. 7

    Windows 7上导入Theano的G ++错误

  8. 8

    使用GPU导入theano时出错

  9. 9

    使用GPU导入theano时出错

  10. 10

    'utf-8'编解码器无法解码LZ4和Python 3.x上位置12的字节0xf0

  11. 11

    npm ci在Windows上输出角度8和节点12的错误:node-gyp重建

  12. 12

    Ubuntu可以在Windows 8平板电脑和可转换版本上运行吗?(戴尔XPS 12)

  13. 13

    Windows 8(8.1)中的jQuery Ajax readystate 0 status 0仅在Chrome上

  14. 14

    selectionModel和selectedRows使用了选定的行,但PyQt4.QtCore.QModelIndex对象位于0x12xxxxxx

  15. 15

    selectionModel和selectedRows使用了选定的行,但PyQt4.QtCore.QModelIndex对象位于0x12xxxxxx

  16. 16

    Ubuntu上的JetBrains Intellij IDEA和Android Studios CPU使用率错误

  17. 17

    C ++ OpenGL glCreateProgram在Windows上返回0

  18. 18

    Windows上的/ dev / ttyACM0?

  19. 19

    C ++ OpenGL glCreateProgram在Windows上返回0

  20. 20

    为什么Visual Studios中缺少Visual Studio 2012-Windows XP(v110_xp)的选项?

  21. 21

    来自iMac的Maxtor 6B250S0可安装在Windows 10 USB上

  22. 22

    如何使用Visual C#访问Visual Studios中的嵌入式资源?

  23. 23

    如何在Kubernetes上使用--device / dev / video0?

  24. 24

    由于错误,c++ 代码不会在 Visual Studios 上运行,但未显示任何错误

  25. 25

    如何使用React和Webpack设置Babel 6 Stage 0

  26. 26

    为什么是Array.new(10){| e | e = e + 2}产生[0 2 4 6 8 10 12 14 16 18]?

  27. 27

    USB存储设备不可用?(在Windows和Linux上为0kb)

  28. 28

    Windows 7上的PID 0和PID 4之间存在什么进程(如果有)?

  29. 29

    如何在Visual Studios发布生成脚本中使用生成时间戳

热门标签

归档