Fix the "tensors to be on the same device" error in HistogramObserver (#59234)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/59075
This PR fixes the "tensors to be on the same device" error in `HistogramObserver`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59234
Reviewed By: jbschlosser
Differential Revision: D28837572
Pulled By: vkuzo
fbshipit-source-id: ff7c3229ced7de2cdd8f76d526f0fd33ac643216