!31556 Fix bug of tile op run failed in pynative mode

Merge pull request !31556 from JoyLvliang/fix_bug_of_tile_op_run_failed_in_pynative
This commit is contained in:
i-robot 2022-03-21 06:30:21 +00:00 committed by Gitee
commit 60ae5513fa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -2079,7 +2079,7 @@ class Tile(PrimitiveWithInfer):
raise TypeError(f"For '{self.name}', the type of 'input_x' should be Tensor, "
f"but got {type(base_tensor).__name__}.")
if all(v == 1 for v in multiplier) and len(base_tensor.shape) >= len(multiplier):
return (True, base_tensor)
return (True, base_tensor.copy())
return (False, None)
def _get_shape_and_range(self, x, multiples):