diff --git a/src/framework/scope.cpp b/src/framework/scope.cpp index 664499d7e635c75ecc277bfc708dda908a25b170..2f7ff247b846f0a5f3e59c5c2f317a59598fc643 100644 --- a/src/framework/scope.cpp +++ b/src/framework/scope.cpp @@ -22,7 +22,6 @@ namespace paddle_mobile { namespace framework { Scope &Scope::NewScope() const { - std::unique_lock lock(mutex_); kids_.push_back(new Scope(this)); return *kids_.back(); } @@ -72,7 +71,6 @@ std::vector Scope::LocalVarNames() const { } void Scope::DeleteScope(Scope *scope) const { - std::unique_lock lock(mutex_); auto it = std::find(kids_.begin(), kids_.end(), scope); kids_.erase(it); delete scope; diff --git a/src/framework/scope.h b/src/framework/scope.h index 27702b88c0c188957b46496dcc4a548a54355c14..b1f0f67b713d699fa68054c6820438843b622142 100644 --- a/src/framework/scope.h +++ b/src/framework/scope.h @@ -15,7 +15,6 @@ limitations under the License. */ #pragma once #include -#include #include #include "variable.h" @@ -71,7 +70,6 @@ class Scope { mutable std::list kids_; Scope const *parent_{nullptr}; - mutable std::mutex mutex_; }; } // namespace framework } // namespace paddle_mobile diff --git a/src/framework/tensor.h b/src/framework/tensor.h index 674edd67733ef8d0520d28f5c131e9da6746ad17..15332cf31c88415d7df46b9ab46f54ad98044927 100644 --- a/src/framework/tensor.h +++ b/src/framework/tensor.h @@ -14,7 +14,7 @@ limitations under the License. */ #pragma once -#include +#include "common/enforce.h" #include #include #include