未验证 提交 58708a00 编写于 作者: W wanghuancoder 提交者: GitHub

[IR] fix assert op pd to kernel pass bug (#56314)

* fix assert op pd to kernel pass bug

* refine

* refine
上级 035d185f
......@@ -305,8 +305,12 @@ phi::KernelKey GetKernelKey(
if (input_type.isa<dialect::AllocatedDenseTensorType>()) {
type = input_type.dyn_cast<dialect::AllocatedDenseTensorType>();
} else if (input_type.isa<ir::VectorType>()) {
type = input_type.dyn_cast<ir::VectorType>()[0]
.dyn_cast<dialect::AllocatedDenseTensorType>();
if (!input_type.dyn_cast<ir::VectorType>().empty()) {
type = input_type.dyn_cast<ir::VectorType>()[0]
.dyn_cast<dialect::AllocatedDenseTensorType>();
} else {
continue;
}
}
// fake tensor here
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册