未验证 提交 f5bf46e6 编写于 作者: A Aurelius84 提交者: GitHub

Fix tile_op inferShape (#40589)

* Fix tile_op inferShape

* fix style
上级 8e631715
......@@ -20,6 +20,11 @@ KernelSignature TileOpArgumentMapping(const ArgumentMappingContext& ctx) {
if (ctx.HasInput("RepeatTimes")) {
return KernelSignature("tile", {"X"}, {"RepeatTimes"}, {"Out"});
} else if (ctx.InputSize("repeat_times_tensor") > 0) {
const auto& repeat_times =
paddle::any_cast<std::vector<int>>(ctx.Attr("repeat_times"));
if (!ctx.IsRuntime() && !repeat_times.empty()) {
return KernelSignature("tile", {"X"}, {"repeat_times"}, {"Out"});
}
return KernelSignature("tile", {"X"}, {"repeat_times_tensor"}, {"Out"});
} else {
return KernelSignature("tile", {"X"}, {"repeat_times"}, {"Out"});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册