I’m looking for a function to round the values in a tensor to a specific number of decimal places, i.e. some kind of functionality similar to round(…) in base python. Does something like this exist in PyTorch now? What is the best way to do this without losing all gradient history?

As I understand this rounding function is undifferentiable, is this correct? and if so is there a way to use the round function and still allow for backprop?

No, the rounding function is a step function and almost everywhere differentiable as explained in this post.
However, since it’s a step function the gradient will be zero almost everywhere, so it’s not really usable in training the model.