Revert "Revert D26907093: Add repeats to Timer.collect_callgrind(...)" (#54484)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54484
Re-land of https://github.com/pytorch/pytorch/pull/53295. (With fixed unit tests.)
This reverts commit 0dc5abfaa9cac9266791788839d896b14600d123.
Test Plan: Imported from OSS
Reviewed By: nikithamalgifb
Differential Revision: D27255201
Pulled By: robieta
fbshipit-source-id: 4e9fed7522631d66c5cd7e27ace9b5ffc3a0bbfc