Variables are deprecated since PyTorch 0.4 and with it the volatile argument.
You can use tensors now, and if you don’t need to calculate gradients (as was specified via volatile=True), you should wrap the code in a torch.no_grad() block:
with torch.no_grad():
    x = x + 1 # Autograd won't track these operations