Skip to content
Permalink
Browse files

Automated rollback of commit 71d3161

PiperOrigin-RevId: 231686985
  • Loading branch information
tensorflower-gardener committed Jan 31, 2019
1 parent bf793a9 commit 4e19402174593095a0837d6e7a8ca3f686b67543
@@ -124,7 +124,8 @@ std::unique_ptr<GraphOptimizer> MetaOptimizer::MakeNewOptimizer(
MK_OPT("scoped_allocator",
new ScopedAllocatorOptimizer(cfg_.scoped_allocator_optimization(),
cfg_.scoped_allocator_opts()));
MK_OPT("small_op", new PinToHostOptimizer(cfg_.pin_to_host_optimization()));
MK_OPT("pin_to_host",
new PinToHostOptimizer(cfg_.pin_to_host_optimization()));

return std::unique_ptr<GraphOptimizer>();
}
@@ -164,7 +165,7 @@ Status MetaOptimizer::InitializeOptimizers(
if (cfg_.remapping() != RewriterConfig::OFF) {
optimizers->push_back(MakeUnique<Remapper>(cfg_.remapping()));
}
if (cfg_.pin_to_host_optimization() == RewriterConfig::ON) {
if (cfg_.pin_to_host_optimization() != RewriterConfig::OFF) {
optimizers->push_back(MakeUnique<PinToHostOptimizer>());
}
if (cfg_.arithmetic_optimization() != RewriterConfig::OFF) {
@@ -679,7 +680,7 @@ bool MetaOptimizerEnabled(const ConfigProto& cfg) {
rewrite_cfg.memory_optimization() != RewriterConfig::NO_MEM_OPT ||
rewrite_cfg.debug_stripper() == RewriterConfig::ON ||
rewrite_cfg.scoped_allocator_optimization() == RewriterConfig::ON ||
rewrite_cfg.pin_to_host_optimization() == RewriterConfig::ON ||
rewrite_cfg.pin_to_host_optimization() != RewriterConfig::OFF ||
!rewrite_cfg.optimizers().empty() ||
!rewrite_cfg.custom_optimizers().empty();
}
@@ -76,7 +76,7 @@ message RewriterConfig {
// Try to allocate some independent Op outputs contiguously in order to
// merge or eliminate downstream Ops (off by default).
Toggle scoped_allocator_optimization = 15;
// Force small ops onto the CPU (default is OFF).
// Force small ops onto the CPU (default is ON).
Toggle pin_to_host_optimization = 18;
// Disable the entire meta optimizer (off by default).
bool disable_meta_optimizer = 19;

0 comments on commit 4e19402

Please sign in to comment.
You can’t perform that action at this time.