6

All I do is,

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
torch.tensor([123,123]).to(device)

And I get:

RuntimeError: CUDA error: device-side assert triggered

I really cannot see why.

Edit: Weirdly enough, I see that this happens only I after I run some code before hand. Restarting the kernel solves it. But why, some code can cause a problem like this? I cannot share the code because it's not mine but I still welcome any guesses. Thanks!

  • Does this answer your question? [CUDA runtime error (59) : device-side assert triggered](https://stackoverflow.com/questions/51691563/cuda-runtime-error-59-device-side-assert-triggered) – kHarshit Dec 03 '20 at 04:55

0 Answers0