pytorch
94965212 - [static runtime] Use at::allclose to test NNC sigmoid (#61566)

Commit
4 years ago
[static runtime] Use at::allclose to test NNC sigmoid (#61566) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/61566 This change uses `at::allclose` to compare results from sigmoid functions (CPU/NNC) instead of `Tensor::equals` due to numerical errors occurring between them. Test Plan: I confirmed that the flakiness of `StaticRuntime.Sigmoid` is gone with this change: ``` [djang@devvm1999.ftw0 ~/fbsource/fbcode] buck-out/gen/caffe2/benchmarks/static_runtime/static_runtime_cpptest -v 3 --gtest_filter=StaticRuntime.Sigmoid --gtest_repeat=100 &> output.txt [djang@devvm1999.ftw0 ~/fbsource/fbcode] grep PASSED output.txt | wc 100 500 2100 ``` Reviewed By: bertmaher Differential Revision: D29671203 fbshipit-source-id: 99a7b16d18ea047c9aad444f36d8368f9d0b088d
Author
Parents
Loading