We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfc02d2 commit d4691ceCopy full SHA for d4691ce
paddle/fluid/inference/api/api_impl.cc
@@ -66,6 +66,7 @@ bool NativePaddlePredictor::Init(
66
if (parent_scope) {
67
scope_ = parent_scope;
68
sub_scope_ = &(parent_scope->NewScope());
69
+ PADDLE_ENFORCE_NOT_NULL(sub_scope_, "create sub scope fail");
70
} else {
71
paddle::framework::InitDevices(false);
72
scope_.reset(new paddle::framework::Scope());
@@ -102,7 +103,6 @@ bool NativePaddlePredictor::Init(
102
103
104
NativePaddlePredictor::~NativePaddlePredictor() {
105
if (sub_scope_) {
- PADDLE_ENFORCE_NOT_NULL(scope_, "Should have parent scope!");
106
scope_->DeleteScope(sub_scope_);
107
}
108
0 commit comments