RuntimeError: CUDA error: device-side assert triggered

/opt/conda/conda-bld/pytorch_1659484772347/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:145: operator(): block: [28,0,0], thread: [52,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1659484772347/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:145: operator(): block: [28,0,0], thread: [58,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1659484772347/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:145: operator(): block: [28,0,0], thread: [60,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1659484772347/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:145: operator(): block: [28,0,0], thread: [62,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1659484772347/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:145: operator(): block: [27,0,0], thread: [122,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
Traceback (most recent call last):
  File "/home/server-12/anaconda3/envs/casmvsnet/lib/python3.7/site-packages/pytorch_lightning/trainer/call.py", line 36, in _call_and_handle_interrupt
    return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, **kwargs)
  File "/home/server-12/anaconda3/envs/casmvsnet/lib/python3.7/site-packages/pytorch_lightning/strat
ce-side assert triggered是由于代码中出现了索引越界导致的错误。这个错误是CUDA报错,具体原因可能是代码中的某个索引超出了合法范围。然而,根据引用\[2\]所述,报错位置的代码并不一定是错误的根本位置,因此需要进一步分析。根据引用\[3\]的问题分析,可能是由于维度范围溢出导致的CUDA错误。为了解决这个问题,可以检查代码中的索引操作,确保索引值在合法范围内。此外,还可以尝试使用调试工具来定位错误的具体位置,并查看相关的报错信息以获取更多的线索。 #### 引用[.reference_title] - *1* *2* [RuntimeError: CUDA error: device-side assert triggered Pytorch框架代码运行错误解决方案(亲测有效!...](https://blog.youkuaiyun.com/weixin_42112050/article/details/120455407)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [「Bug」问题分析 RuntimeError: CUDA error: device-side assert triggered](https://blog.youkuaiyun.com/ViatorSun/article/details/125207465)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值