其他分享
首页 > 其他分享> > CUDA error: device-side assert triggered

CUDA error: device-side assert triggered

作者:互联网

运行时出现下面的错误:

C:/cb/pytorch_1000000000000/work/aten/src/ATen/native/cuda/IndexKernel.cu:142: block: [0,0,0], thread: [17,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
C:/cb/pytorch_1000000000000/work/aten/src/ATen/native/cuda/IndexKernel.cu:142: block: [0,0,0], thread: [61,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
C:/cb/pytorch_1000000000000/work/aten/src/ATen/native/cuda/IndexKernel.cu:142: block: [0,0,0], thread: [62,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
C:/cb/pytorch_1000000000000/work/aten/src/ATen/native/cuda/IndexKernel.cu:142: block: [0,0,0], thread: [63,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
...
RuntimeError: CUDA error: device-side assert triggered

这是因为Tensor下标越界,造成CUDA断言错误,不让下标越界就正常了.

标签:index,triggered,sizes,cb,ATen,Assertion,assert,CUDA,&&
来源: https://www.cnblogs.com/mstk/p/14724470.html