Skip to content

Commit 0981d33

Browse files
authored
[MLU] fix tile out shape (#1364)
1 parent 34c1d40 commit 0981d33

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

backends/mlu/kernels/tile_kernel.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ void TileKernelImpl(const Context& dev_ctx,
6262
}
6363
if (repeat_one_times) {
6464
TensorCopy(dev_ctx, x, false, out);
65+
if (!x.dims().size()) {
66+
out->Resize({1});
67+
}
6568
} else {
6669
phi::DDim new_in_dims = phi::make_ddim(vec_in_dims);
6770
phi::DDim out_dims(new_in_dims);

0 commit comments

Comments
 (0)