RuntimeError CUDA error: device-side assert triggered
-
If you can, please include a screenshot of your problem
-
Please include the name of your operating system Ubuntu 20.04.6 LTS
-
If you can, steps to reproduce are super helpful I encountered a strange problem when I tried to debug my code in cursor. The specific problem was that I tried to use tensor index to operate the original tensor and assign it to the original tensor. An error occurred. x = x[(1-mask_with_buffer).nonzero(as_tuple=True)].reshape(bsz, -1, embed_dim) You can understand the above code as trimming the shape of x according to the mask index. The same code was debugged in vscode without any exceptions. Even when I moved the tensor in cursor to CPU for operation, there was no exception. Looking forward to your reply!