未验证 提交 18f0ab86 编写于 作者: H HongyuJia 提交者: GitHub

fix possible bug (#49367)

上级 9f5afa62
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册