forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add exhaustive testing to ValueRanges, fix bugs (pytorch#94939)
Since I didn't want to deal with nondeterministic tests, I went the exhaustive testing route for a fixed list of constants to look at. The tests generate random ranges, propagate the range through the function, and then pick elements in the range and check that the result on the operation is in the resulting range. This caught bugs in log, sqrt and pow. My resolution for pow was a little special, because I had trouble figuring out the correct semantics under all inputs domains. Instead, I picked two input domains (pow on two point ranges, and pow where exponent is known) and only implemented those. Everything else we give up. I think this is unlikely to affect perf. Signed-off-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: pytorch#94939 Approved by: https://github.com/lezcano, https://github.com/eellison, https://github.com/nunoplopes
- Loading branch information
1 parent
12c9a93
commit 08ef83f
Showing
3 changed files
with
104 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ideep
updated
6 files
+1 −9 | include/ideep/lru_cache.hpp | |
+0 −186 | include/ideep/operators/conv.hpp | |
+0 −76 | include/ideep/operators/inner_product.hpp | |
+0 −54 | include/ideep/operators/matmul.hpp | |
+0 −12 | include/ideep/tensor.hpp | |
+0 −44 | include/ideep/utils.hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters