pytorch
8507ea22 - replace timer test with a mocked variant (#45173)

Commit
4 years ago
replace timer test with a mocked variant (#45173) Summary: I noticed that the recently introduced adaptive_autorange tests occasionally timeout CI, and I've been meaning to improve the Timer tests for a while. This PR allows unit tests to swap the measurement portion of `Timer` with a deterministic mock so we can thoroughly test behavior without having to worry about flaky CI measurements. It also means that the tests can be much more detailed and still finish very quickly. Pull Request resolved: https://github.com/pytorch/pytorch/pull/45173 Test Plan: You're lookin' at it. Reviewed By: ezyang Differential Revision: D23873548 Pulled By: robieta fbshipit-source-id: 26113e5cea0cbf46909b9bf5e90c878c29e87e88
Author
Taylor Robie
Parents
Loading