mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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:
committed by
Facebook GitHub Bot
parent
efd70b7ce6
commit
99203580a9
@ -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,
|
||||
|
Reference in New Issue
Block a user