What about explicitly setting the flag?
x = torch.tensor(1., requires_grad=True)
torch.tensor([x**3, 2*x], requires_grad=True)

Edit: sorry, that won’t work, as it will create new variables (one in the position of x***3 and one in the position of 2*x) with their own grad history.