Unfortunately, this is a bit complicated at the moment, even for developing PyTorch repo. The two files you linked are only used to generate methods for Variables. The Tensor methods are generated elsewhere. We are in the progress of merging Variable and Tensor, so in future, only one method will suffice.