Solved by colesbury in post #12 
              
              
                On the latest version of PyTorch you can use Tensor.put_ with accumulate=True: 
http://pytorch.org/docs/master/tensors.html#torch.Tensor.put_ 
You will need to translate your indices into linear indexes though. Most other in-place indexing functions (like index_add_) have undefined behavior for dupl…