How to get cuda variable gradient?

explained here: Strange behavior of Variable.cuda() and Variable.grad