jbwang1997 / OBBDetection

OBBDetection is an oriented object detection library, which is based on MMdetection.
Apache License 2.0
537 stars 113 forks source link

关于train过程出现CUDA error的问题 #36

Closed RyanChanli closed 3 years ago

RyanChanli commented 3 years ago

当我运行训练命令: python train.py OBBDetection/tools/work_dirs/faster_rcnn_orpn_r50_fpn_1x_dota10/faster_rcnn_orpn_r50_fpn_1x_dota10.py 会出现下面报错: RuntimeError: CUDA error: invalid device function CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Segmentation fault (core dumped) 我的环境如下: TorchVision: 0.10.0 OpenCV: 4.5.3 MMCV: 0.6.2 MMDetection: 2.2.0+6505a9d MMDetection Compiler: GCC 7.3 MMDetection CUDA Compiler: 10.0 如果您能提供帮助将万分感谢~

jbwang1997 commented 3 years ago

这可能是编译与pytorch支持的CUDA版本不匹配

jbwang1997 commented 3 years ago

可以检查CUDA_HOME与pytorch的CUDA是否是相同的版本

RyanChanli commented 3 years ago

不好意思,请问您说的”pytorch的cuda“是指哪个?目前我使用的pytorch1.9与我使用的cuda10.2是匹配的

------------------ 原始邮件 ------------------ 发件人: "jbwang1997/OBBDetection" @.>; 发送时间: 2021年9月29日(星期三) 下午3:37 @.>; @.**@.>; 主题: Re: [jbwang1997/OBBDetection] 关于train过程出现CUDA error的问题 (#36)

可以检查CUDA_HOME与pytorch的CUDA是否是相同的版本

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

jbwang1997 commented 3 years ago

但是上面MMDetection环境收集的结果显示编译的环境是CUDA10.0,MMDetection在编译的时候会使用CUDA_HOME中的CUDA进行编译,需要注意这两个CUDA的匹配

RyanChanli commented 3 years ago

哦哦,我似乎在下图中发现了两个版本不匹配的问题,但是想问下您应该如何修改呢

------------------ 原始邮件 ------------------ 发件人: "jbwang1997/OBBDetection" @.>; 发送时间: 2021年9月29日(星期三) 下午3:53 @.>; @.**@.>; 主题: Re: [jbwang1997/OBBDetection] 关于train过程出现CUDA error的问题 (#36)

但是上面MMDetection环境收集的结果显示编译的环境是CUDA10.0,MMDetection在编译的时候会使用CUDA_HOME中的CUDA进行编译,需要注意这两个CUDA的匹配

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

jbwang1997 commented 3 years ago

安装CUDA10.2,并将CUDA_HOME变量设置为先安装的CUDA目录

RyanChanli commented 3 years ago

嗯嗯,那我试试,麻烦了!

------------------ 原始邮件 ------------------ 发件人: "jbwang1997/OBBDetection" @.>; 发送时间: 2021年9月29日(星期三) 下午4:01 @.>; @.**@.>; 主题: Re: [jbwang1997/OBBDetection] 关于train过程出现CUDA error的问题 (#36)

安装CUDA10.2,并将CUDA_HOME变量设置为先安装的CUDA目录

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.