From a606db6762fc7fde1381d376e1e3e0bfe9672e7a Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Wed, 23 Nov 2022 10:40:13 +0800 Subject: [PATCH] fix vector out of range error (#48255) --- paddle/phi/kernels/funcs/broadcast_function.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/phi/kernels/funcs/broadcast_function.h b/paddle/phi/kernels/funcs/broadcast_function.h index a222422c89f..325a90e5ed0 100644 --- a/paddle/phi/kernels/funcs/broadcast_function.h +++ b/paddle/phi/kernels/funcs/broadcast_function.h @@ -878,7 +878,7 @@ void BroadcastKernelForDifferentVecSize( const auto dims_simplifier = BroadcastDimsSimplifier(ins, (*outs)[0]->dims(), axis); if (VLOG_IS_ON(4)) { - for (size_t i = 0; i < dims_simplifier.in_dims.size(); ++i) { + for (size_t i = 0; i < ins.size(); ++i) { VLOG(4) << "input i=" << i << ": origin_dims={" << ins[i]->dims() << "}, simplied_dims={" << phi::make_ddim(dims_simplifier.in_dims[i]) << "}"; -- GitLab