Skip to content

Commit

Permalink
fix tile_sig
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelius84 committed Mar 9, 2022
1 parent fa3781f commit 67537d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paddle/phi/ops/compat/tile_sig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace phi {
KernelSignature TileOpArgumentMapping(const ArgumentMappingContext& ctx) {
if (ctx.HasInput("RepeatTimes")) {
return KernelSignature("tile", {"X"}, {"RepeatTimes"}, {"Out"});
} else if (ctx.HasInput("repeat_times_tensor")) {
} else if (ctx.InputSize("repeat_times_tensor") > 0) {
return KernelSignature("tile", {"X"}, {"repeat_times_tensor"}, {"Out"});
} else {
return KernelSignature("tile", {"X"}, {"repeat_times"}, {"Out"});
Expand All @@ -32,7 +32,7 @@ KernelSignature TileGradOpArgumentMapping(const ArgumentMappingContext& ctx) {
{"X", GradVarName("Out")},
{"RepeatTimes"},
{GradVarName("X")});
} else if (ctx.HasInput("repeat_times_tensor")) {
} else if (ctx.InputSize("repeat_times_tensor") > 0) {
return KernelSignature("tile_grad",
{"X", GradVarName("Out")},
{"repeat_times_tensor"},
Expand Down

0 comments on commit 67537d6

Please sign in to comment.