Updates internal assert_allclose callsites in favor of assert_close (#61841)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61841

Redo of #60863.

Test Plan: Imported from OSS

Reviewed By: ngimel

Differential Revision: D30408145

Pulled By: mruberry

fbshipit-source-id: 0b34ebc7f23ba38ecd89640b61d8aca59b7eab58
This commit is contained in:
Philip Meier
2021-08-19 12:45:32 -07:00
committed by Facebook GitHub Bot
parent efd70b7ce6
commit 99203580a9
26 changed files with 246 additions and 245 deletions

View File

@ -1,7 +1,6 @@
import torch
from torch.utils import ThroughputBenchmark
from torch.testing import assert_allclose
from torch.testing._internal.common_utils import run_tests, TestCase, TemporaryFileName
@ -56,7 +55,7 @@ class TestThroughputBenchmark(TestCase):
# or just unpack the list of inputs
module_result = module(*inputs[i])
bench_result = bench.run_once(*inputs[i])
assert_allclose(bench_result, module_result)
torch.testing.assert_close(bench_result, module_result)
stats = bench.benchmark(
num_calling_threads=4,