Adds @overridePrecision decorator (#28131)
Summary:
Adds the overridePrecision decorator, which allows device generic tests to specify per-dtype precision overrides.
Precision is overridden on the test class instance itself, and so is thread-local (so that running multiple tests in parallel will not conflict). It can be accessed directly from a test with self.precision, as before.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28131
Differential Revision: D17969774
Pulled By: mruberry
fbshipit-source-id: c4e0b71afac6bdc7cbf4e799f3054922de764820