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!