From b5b8e6cc9c0b219d9fea2c43944798509f035d04 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Sat, 23 Feb 2019 09:28:56 +0800 Subject: [PATCH] revert the change of scope test=develop --- paddle/fluid/framework/scope.cc | 27 --------------------------- paddle/fluid/framework/scope.h | 1 - 2 files changed, 28 deletions(-) diff --git a/paddle/fluid/framework/scope.cc b/paddle/fluid/framework/scope.cc index 4fe843dde9c..87f0f307d30 100644 --- a/paddle/fluid/framework/scope.cc +++ b/paddle/fluid/framework/scope.cc @@ -255,32 +255,5 @@ std::string GenScopeTreeDebugInfo(Scope* root) { return os.str(); } -std::string GenParentScopeTreeDebugInfo(Scope* leaf) { - std::stringstream os; - - if (!leaf) return ""; - - // level traversal - std::vector scopes; - const Scope* current_scope = leaf; - - while (current_scope != nullptr) { - scopes.push_back(current_scope); - current_scope = current_scope->parent(); - } - - os << "\n--------------GenParentScopeTreeDebugInfo--------------\n"; - - for (int i = scopes.size() - 1; i >= 0; --i) { - os << "=======level [" << i << "]=======\n"; - os << scopes[i] << ":\n"; - for (auto& var : scopes[i]->LocalVarNames()) { - os << " - " << var << "\n"; - } - } - - return os.str(); -} - } // namespace framework } // namespace paddle diff --git a/paddle/fluid/framework/scope.h b/paddle/fluid/framework/scope.h index eb5c12def6a..f0915d2eee0 100644 --- a/paddle/fluid/framework/scope.h +++ b/paddle/fluid/framework/scope.h @@ -144,7 +144,6 @@ class Scope { // Generate some debug string about the inherience structure of scope, quite // naive. std::string GenScopeTreeDebugInfo(Scope*); -std::string GenParentScopeTreeDebugInfo(Scope*); } // namespace framework } // namespace paddle -- GitLab