Skip to content

Commit 15442af

Browse files
authored
Use safe_numerics util from PyTorch (#12125)
### Summary Reopening from #11537 Fixes #11370 ### Test plan Use existing tests since we are doing a drop-in replacement for overflow checks.
1 parent e54a413 commit 15442af

File tree

4 files changed

+1020
-16
lines changed

4 files changed

+1020
-16
lines changed

runtime/core/portable_type/c10/c10/targets.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ def define_common_targets():
112112
"util/complex_utils.h",
113113
"util/floating_point_utils.h",
114114
"util/irange.h",
115+
"util/llvmMathExtras.h",
115116
"util/overflows.h",
117+
"util/safe_numerics.h",
116118
],
117119
exported_preprocessor_flags = [
118120
"-DC10_USING_CUSTOM_GENERATED_MACROS",

0 commit comments

Comments
 (0)