未验证 提交 260ef770 编写于 作者: L Leo Chen 提交者: GitHub

fix conditional block (#32243)

上级 64df2a55
...@@ -79,8 +79,7 @@ class ConditionalOp : public framework::OperatorBase { ...@@ -79,8 +79,7 @@ class ConditionalOp : public framework::OperatorBase {
platform::DeviceContextPool::Instance().Get(ips[0]->place())->Wait(); platform::DeviceContextPool::Instance().Get(ips[0]->place())->Wait();
res = cpu_tensor.data<bool>()[0]; res = cpu_tensor.data<bool>()[0];
#endif #endif
} } else if (platform::is_npu_place(ips[0]->place())) {
if (platform::is_npu_place(ips[0]->place())) {
#ifdef PADDLE_WITH_ASCEND_CL #ifdef PADDLE_WITH_ASCEND_CL
framework::LoDTensor cpu_tensor; framework::LoDTensor cpu_tensor;
framework::TensorCopy(*ips[0], platform::CPUPlace(), &cpu_tensor); framework::TensorCopy(*ips[0], platform::CPUPlace(), &cpu_tensor);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册