Re-enable the arithmetic optimizer by default in tests.
Add a warning to not disable optimizers without consulting with the Grappler team. PiperOrigin-RevId: 215584369
This commit is contained in:
parent
a5b3cd8b4d
commit
0f9baa02a4
@ -1992,10 +1992,12 @@ class TensorFlowTestCase(googletest.TestCase):
|
||||
# Don't perform optimizations for tests so we don't inadvertently run
|
||||
# gpu ops on cpu
|
||||
config.graph_options.optimizer_options.opt_level = -1
|
||||
# Disable Grappler constant folding since some tests & benchmarks
|
||||
# use constant input and become meaningless after constant folding.
|
||||
# DO NOT DISABLE GRAPPLER OPTIMIZERS WITHOUT CONSULTING WITH THE
|
||||
# GRAPPLER TEAM.
|
||||
config.graph_options.rewrite_options.constant_folding = (
|
||||
rewriter_config_pb2.RewriterConfig.OFF)
|
||||
config.graph_options.rewrite_options.arithmetic_optimization = (
|
||||
rewriter_config_pb2.RewriterConfig.OFF)
|
||||
config.graph_options.rewrite_options.pin_to_host_optimization = (
|
||||
rewriter_config_pb2.RewriterConfig.OFF)
|
||||
return config
|
||||
|
@ -275,8 +275,8 @@ class LaplaceTest(test.TestCase):
|
||||
self.assertAllClose(
|
||||
sample_values.var(axis=0),
|
||||
stats.laplace.var(loc_bc, scale=scale_bc),
|
||||
rtol=0.10,
|
||||
atol=0.)
|
||||
rtol=0.105,
|
||||
atol=0.0)
|
||||
fails = 0
|
||||
trials = 0
|
||||
for ai, a in enumerate(np.reshape(loc_v, [-1])):
|
||||
|
Loading…
Reference in New Issue
Block a user