【CUDA开发】 Check failed: error == cudaSuccess (8 vs. 0) invalid device function
最近在复现R-CNN一系列的实验时,配置代码环境真是花费了不少时间。由于对MATLAB不熟悉,实验采用的都是github上rbg大神的Python版本。在配置Faster
R-CNN时,编译没有问题,一运行 ./tools/demo.py --net zf 就会出现如下错误:
<span style="font-size:14px;">Loaded network ./data/faster_rcnn_models/ZF_faster_rcnn_final.caffemodel
F1008 roi_pooling_layer.cu:91] Check failed: error == cudaSuccess (8 vs. 0) invalid device function
*** Check failure stack trace: *** </span>
但是采用CPU mode运行时可以成功。
最后在https://github.com/rbgirshick/py-faster-rcnn/issues/2
找到了我想要的答案,有兴趣的可以慢慢阅读。
不想看的话,就直接按照我下面的方式修改。
一般情况下都是因为显卡的计算能力不同而导致的,修改 py-faster-rcnn/lib/setup.py 的第135行,将arch改为与你显卡相匹配的数值,(比如我的GTX 760,计算能力是3.0,就将sm_35改成了sm_30)然后删除utils/bbox.c,nms/cpu_nms.c ,nms/gpu_nms.cpp 重新编译即可
我看到有些人说还有其他的问题,那么可以在最开始的makefile.config文件中就开始修改,不过我没有试过,具体步骤如下
- <span style="font-size:14px;">As below, there is my solution (thress steps):
- 1 if you're using the GPU instance on AWS, then please change the architecture setting into:
- # CUDA architecture setting: going with all of them.
- # For CUDA < 6.0, comment the *_50 lines for compatibility.
- CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \
- -gencode arch=compute_50,code=sm_50 \
- -gencode arch=compute_50,code=compute_50
- Because the GPU in AWS does not support compute_35
- 2 I changed sm_35 into sm_30 in lib/setup.py file
- 3 cd lib, remove these files: utils/bbox.c nms/cpu_nms.c nms/gpu_nms.cpp, if they exist.
- And then make && cd ../caffe/ && make clean && make -j8 && make pycaffe -j8 </span>
【CUDA开发】 Check failed: error == cudaSuccess (8 vs. 0) invalid device function的更多相关文章
- caffe运行错误: im2col.cu:61] Check failed: error == cudaSuccess (8 vs. 0) invalid device function
错误: im2col.cu:61] Check failed: error == cudaSuccess (8 vs. 0) invalid device function 原因:由于Makefil ...
- 配置SSD-caffe测试时出现“Check failed: error == cudaSuccess (10 vs. 0) invalid device ordinal”解决方案
这是由于GPU数量不匹配造成的,如果训练自己的数据,那么我们只需要将solver.prototxt文件中的device_id项改为自己的GPU块数,一块就是0,两块就是1,以此类推. 但是SSD配置时 ...
- caffe 训练时,出现错误:Check failed: error == cudaSuccess (4 vs. 0) unspecified launch failure
I0415 15:03:37.603461 27311 solver.cpp:42] Solver scaffolding done.I0415 15:03:37.603549 27311 solve ...
- Caffe 分类问题 Check failed: error == cudaSuccess (2 vs. 0) out of memory
如果图片过大,需要适当缩小batch_size的值,否则使用GPU时可能超出其缓存大小而报错
- check failed status == cudnn_status_success (4 vs. 0) cudnn_status_internal_error
Check failed: error == cudaSuccess (30 vs. 0) unknown error 这个有可能是显存不足造成的,或者网络参数不对造成的 check failed ...
- 目标检测faster rcnn error == cudaSuccess (2 vs. 0) out of memory
想尝试 更深更强的网络,或者自己写了一个费显存的层,发现1080 ti的11G显存不够用了,老师报显存不够怎么办? Check failed: error == cudaSuccess (2 vs. ...
- Check failed: status == CUBLAS_STATUS_SUCCESS (11 vs. 0) CUBLAS_STATUS_MAPPING_ERROR
I0930 21:23:15.115576 30918 solver.cpp:281] Learning Rate Policy: multistepF0930 21:23:17.263314 310 ...
- CUDA报错: Cannot create Cublas handle. Cublas won't be available. 以及:Check failed: status == CUBLAS_STATUS_SUCCESS (1 vs. 0) CUBLAS_STATUS_NOT_INITIALIZED
Error描述: aita@aita-Alienware-Area-51-R5:~/AITA2/daisida/ssd-github/caffe$ make runtest -j8 .build_re ...
- windows7下解决caffe check failed registry.count(type) == 1(0 vs. 1) unknown layer type问题
在Windows7下调用vs2013生成的Caffe静态库时经常会提示Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer t ...
随机推荐
- [转]Linux-虚拟网络设备-tun/tap
转: 原文:https://blog.csdn.net/sld880311/article/details/77854651 ------------------------------------- ...
- django-提交订单
购物车cart.html页面加form表单提交 <form method="post" action="{% url 'order:place' %}"& ...
- Vue --- 组件练习
一 ad_data = { tv: [ {img: 'img/tv/001.png', title: 'tv1'}, {img: 'img/tv/002.png', title: 'tv2'}, {i ...
- cors劫持用户凭证任意登陆
漏洞作者:rcoil 挖洞过程无意中看到一个数据包,响应包中包含有Access-Control-Allow-Origin这个字段,然后就随手尝试看看有没有CORS漏洞!结果如图 再尝试 发现如下图! ...
- LeetCode 457. Circular Array Loop
原题链接在这里:https://leetcode.com/problems/circular-array-loop/ 题目: You are given a circular array nums o ...
- learning scala someElements
The Scala collections library provides specialised implementations for Sets of fewer than 5 values ( ...
- springboot2.0整合redis作为缓存以json格式存储对象
步骤1 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spr ...
- (10)Go结构体struct
结构体 Go语言中的基础数据类型可以表示一些事物的基本属性,但是当我们想表达一个事物的全部或部分属性时,这时候再用单一的基本数据类型明显就无法满足需求了,Go语言提供了一种自定义数据类型,可以封装多个 ...
- nginx中的upstream使用
upstream的基本使用 upstream admin{server 127.0.0.1:9090 down;server 127.0.0.1:8080 weight=2;server 127.0. ...
- tengine负载均衡高可用配置
环境 Tengine-master:192.168.109.100 Tengine-slave:192.168.109.101 tomcat01:192.168.109.102 tomcat02:19 ...