How do you update the value of a 0-dim tensor in-place?
import torch
t = torch.tensor(0, device='cuda')

# Now we want to set the value to 8 without creating a new tensor...
t[0] = 8  # <-- Bad: Fails with IndexError
t = 8  # <-- Bad: t is an int, not a Tensor, after this

What is the official/recommended way I’m supposed to achieve this?