I would like to create bunch of tensors, that share the same data and same gradient accumulation, but are viewed as different tensors by autograd when calculating gradients.
So when I call backward() on the function I try to optimize, pytorch will calculate separate gradient for each of the tensors. But instead of keeping every gradient separely, it will sum them all together. And when I call optimization step(), it will used this shared accumulated gradient to update shared data.
So all tensors always have exactly the same value and exactly the same grad, but are viewed as different tensors by the rest of my calculation graph.