From 18f0ab86a3f8f13e38d62b538ed049e1369646b2 Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Fri, 30 Dec 2022 12:56:48 +0800 Subject: [PATCH] fix possible bug (#49367) --- paddle/fluid/framework/operator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index 991476dff5..eb7ad8ed94 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -1603,11 +1603,11 @@ void OperatorWithKernel::RunImpl(const Scope& scope, } #endif - auto exe_ctx = ExecutionContext(*this, scope, *dev_ctx, *runtime_ctx); // using cache if (kernel_type_.get()) { dev_ctx = pool.Get(kernel_type_->place_); } + auto exe_ctx = ExecutionContext(*this, scope, *dev_ctx, *runtime_ctx); // TODO(Liu-xiandong): Now we are using too much if-else and hard code in XPU // device, it's ugly, and we will refactor in the future. -- GitLab