RTX3090+cuda11.1配置pytorch踩坑记录(IndexKernel.cu:142: operator(): block: [0,0,0], thread: [64,0,0])

注意:
pytorch1.8.1有坑,训练报错信息如下:

/pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:142: operator(): block: [0,0,0], thread: [64,0,0] Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds" failed.
/pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:142: operator(): block: [0,0,0], thread: [65,0,0] Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds" failed.
RuntimeError: CUDA error: device-side assert triggered

以上是我在cuda11.1的RTX3090服务器训练Faster-RCNN遇到的问题,网上都说大概率是数据集标签越界的问题,检查了一晚上代码和数据集,结果在原来的TiTan X机器训练(pytorch1.6.0)没有问题,果然是pytorch版本的问题。

之所以安装pytorch1.8.1,是因为pytorch官网推荐的安装方式是cuda11.1+pytorch1.8.0(找不到cuda11.1+pytorch1.6.0的安装版本)

结果pytorch1.8.0在我的代码里面依然报错,然后就装了pytorch1.8.1(torchvision0.9.1),然后就出现开头这个错误了

最终解决办法:继续降版本,安装pytorch1.7.1

pip install torch===1.7.1+cu110 torchvision===0.8.2+cu110 torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.htm

由于目前使用pytorch1.8.1的小伙伴还不多,因此为后人记录下,以防踩坑。

  • 13
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值