找回密码
 注册
关于网站域名变更的通知
查看: 607|回复: 2
打印 上一主题 下一主题

咨询一下在使用vs2017给matlab做编译器的时候出现的问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2019-10-14 08:30 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x

( Y& Y( R  B: _5 V* t
1 B9 U9 a$ i+ A3 @' D# x2 c

' E5 v7 N  g+ B# `

我在复现这个里面的* F+ F% P* d, n8 I! _" s/ I
https://github.com/cszn/IRCNN
3 k; j  G: S$ k* S; \/ D9 q7 {3 I目前是matlab2016b和vs2017  Y% ^5 a4 K" _6 `+ C0 u, ]2 W! ^' P% H
输入代码这些8 q5 ]3 E$ u1 h% G/ C
mex -setup
; l8 Z7 p+ z# W+ F9 x  N) e) V. \mex -setup:'C:\Program files\MATLAB\R2016b\bin\win64\mexopts\msvc2017.xml' C

mex -setup C++% `4 N  e: H0 ]! v1 R: U
mex -setup:'C:\Program files\MATLAB\R2016b\bin\win64\mexopts\msvcpp2017.xml' C++

cd 'C:\Program files\MATLAB\R2016b\matconvnet\matconvnet-1.0-beta25'7 E& ], N9 c1 Z4 y! }5 m% u" C" K
addpath matlab

%run this0 J8 [" u# D2 z
vl_compilenn('enableGpu', true, 'cudaMethod', 'nvcc', ...5 c, t; D( ~" w/ C' \$ L" M
'cudaRoot', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0', ...
7 Q& M7 }5 h' g! b'enableCudnn', true, 'cudnnRoot', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0') ;

+ h' Q- V/ n. z4 ?


) W; q, d4 _8 ?, L8 `, S8 T, v2 R8 q


& ]5 B  ?; w# |" Y/ e8 O4 w0 j$ m

该用户从未签到

2#
发表于 2019-10-14 18:51 | 只看该作者
你有没有安装cuda sdk8.0和cudnn,你的计算机有没有和cudnn兼容的NVIDIA的显示卡(需要GTX 650以上档次。)

该用户从未签到

3#
发表于 2019-10-14 18:51 | 只看该作者

CUDNN目录不要包含空格。

下面是在stackoverflow上的解答, 供题主参考:

Answer by Joss Knight

This appears to be a bug in MatConvNet's vl_compilenn function preventing it from working when your cudnn include path contains spaces. In my version lines 298-301 say:

if opts.enableCudnn,
, e  f% e5 a- t' x$ J2 Y. H6 uflags.cc{end+1} = '-DENABLE_CUDNN' ;
3 p, N# S0 H4 v; s! ^' Tflags.cc{end+1} = ['-I' opts.cudnnIncludeDir] ;
4 @, x$ \( u3 f$ I3 Yend
& R9 [  H4 R# u' [' LThe third line is missing quotes, so change it to:

if opts.enableCudnn,4 V; t' ~) T9 Z9 I  C1 N+ z6 Q
flags.cc{end+1} = '-DENABLE_CUDNN' ;
1 G/ j% S0 I8 pflags.cc{end+1} = ['-I"' opts.cudnnIncludeDir '"'] ;
# a1 U2 G0 B# ]$ ?: A2 Kend* ^' d# o6 v2 Y6 B  I- Z1 w1 c# T& H/ b1 o
The actual lines of code may be slightly different in your version of vl_compilenn.

This is a very bad error and I can see similar mistakes being made through that file, which makes me think that somehow under normal circumstances this is not a problem and it's only cropping up on your system for some reason.

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-11-23 23:10 , Processed in 0.156250 second(s), 26 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表