Hmm, I modified self.save_for_backend to self.save_for_backward because there is no save_for_backend in Function.
class F(torch.autograd.Function):
   def forward(self, i):
         self.save_for_backward(i) # <- fixed here
         return tr.FloatTensor([1])
   
   def backward(self, c):
         a = tr.zeros(10,10)
         i = self.saved_tensors
         a[i] = tr.ones(3,10) 
         return None 

f = F()
f(torch.autograd.Variable(tr.LongTensor([2,3,4])))

Then it returns
Variable containing:
 1
[torch.FloatTensor of size 1]