matcaffe compilation problem: undefined reference to mxIsGPUArray

本文解决了一个在Matlab中使用GPU进行编译时出现的链接错误问题,该问题表现为无法找到mxIsGPUArray等函数。通过调整编译设置成功解决了此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Even if the mxGPUArray.h is added to the include path. The library is not linked.
Solution is following:https://www.mathworks.com/matlabcentral/answers/294938-cannot-find-lmwgpu

The error message is as follows:
/tmp/mex_7501987706806805_32017/caffe_.o: In function mx_mat_to_blob(mxArray_tag const*, caffe::Blob<float>*, WhichMemory)':
caffe_.cpp:(.text+0xc5): undefined reference to
mxIsGPUArray’
caffe_.cpp:(.text+0xce): undefined reference to mxInitGPU'
caffe_.cpp:(.text+0xd6): undefined reference to
mxGPUCreateFromMxArray’
caffe_.cpp:(.text+0xe1): undefined reference to mxGPUGetDataReadOnly'
caffe_.cpp:(.text+0xf4): undefined reference to
mxGPUGetNumberOfElements’
caffe_.cpp:(.text+0x1a7): undefined reference to mxIsGPUArray'
caffe_.cpp:(.text+0x1b3): undefined reference to
mxGPUDestroyGPUArray’
/tmp/mex_7501987706806805_32017/caffe_.o: In function blob_set_data(int, mxArray_tag**, int, mxArray_tag const**)':
caffe_.cpp:(.text+0x434): undefined reference to
mxIsGPUArray’
collect2: error: ld returned 1 exit status

Makefile:508: recipe for target ‘matlab/+caffe/private/caffe_.mexa64’ failed
make: * [matlab/+caffe/private/caffe_.mexa64] Error 255

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值