未验证 提交 37c487e0 编写于 作者: H hong 提交者: GitHub

fix new ir stream analysis bug (#55915)

上级 08f28b40
......@@ -111,6 +111,15 @@ OpFuncType AnalyseOpFuncType(ir::Operation* op, const platform::Place& place) {
return OpFuncType::kCpuSync;
}
auto kernel_key = op->attributes()
.at("kernel_key")
.dyn_cast<dialect::KernelAttribute>()
.data();
if (phi::TransToPhiPlace(kernel_key.backend()).GetType() ==
phi::AllocationType::CPU) {
return OpFuncType::kCpuSync;
}
PADDLE_ENFORCE_EQ(interpreter::IsSupportedHeterPlace(place),
true,
phi::errors::Fatal("Unsupported current place %s", place));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册