Skip to content

Commit c190be1

Browse files
committed
Fix
1 parent 2b17515 commit c190be1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

paddle/phi/kernels/impl/multi_dot_kernel_impl.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ void MultiDotKernel(const Context& ctx,
187187
if (x[i]->numel() == 0) size_0 = true;
188188
}
189189
if (size_0) {
190+
// For example: [2, 0], [0, 4] -> [2, 4]
191+
if (out && out->numel() > 0) {
192+
phi::Full<T, Context>(
193+
ctx, phi::IntArray(common::vectorize(out->dims())), 0, out);
194+
}
190195
return;
191196
}
192197
const T scale = static_cast<T>(1.0);

0 commit comments

Comments
 (0)