I just checked this using a simple script
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.optim import SGD

x = Variable(torch.zeros(3, 4), requires_grad=True)

a = (3 * x).sum()

oa = SGD([x], momentum=0.0, lr=1.0)

for i in range(100):
    oa.zero_grad()
    a.backward()
    print('-' * 40)
    print(x.grad)
    x._grad = Variable(torch.ones(x.grad.size()))
    print(x.grad)
    oa.step()
    print(x)


However this behavior seems undocumented…