未验证 提交 ee1aa69c 编写于 作者: W Winters Montagne 提交者: GitHub

fix two minor issues (#53658)

上级 26fe2dcb
...@@ -50,7 +50,7 @@ struct BroadcastDimsSimplifier { ...@@ -50,7 +50,7 @@ struct BroadcastDimsSimplifier {
in_dims[j] = phi::vectorize<int64_t>(ins[j]->dims()); in_dims[j] = phi::vectorize<int64_t>(ins[j]->dims());
} }
} }
ExtendInputDimensions(N, axis); ExtendInputDimensions(axis);
// To Merge the dimensions of input_tensors while the consequtive // To Merge the dimensions of input_tensors while the consequtive
// equal-dimensions appears. Example below : // equal-dimensions appears. Example below :
...@@ -103,7 +103,7 @@ struct BroadcastDimsSimplifier { ...@@ -103,7 +103,7 @@ struct BroadcastDimsSimplifier {
private: private:
// To compensate the lackage of input_tensors' dimension with axis. // To compensate the lackage of input_tensors' dimension with axis.
void ExtendInputDimensions(int N, int axis) { void ExtendInputDimensions(int axis) {
for (auto &in_dim : in_dims) { for (auto &in_dim : in_dims) {
if (in_dim.size() < rank) { if (in_dim.size() < rank) {
DimVector extended_in_dim(rank, 1); DimVector extended_in_dim(rank, 1);
...@@ -120,7 +120,7 @@ struct BroadcastDimsSimplifier { ...@@ -120,7 +120,7 @@ struct BroadcastDimsSimplifier {
"{%s}.", "{%s}.",
in_idx, in_idx,
out_idx, out_idx,
out_dims[axis], out_dims[out_idx],
in_dim[in_idx], in_dim[in_idx],
phi::make_ddim(in_dim), phi::make_ddim(in_dim),
phi::make_ddim(out_dims))); phi::make_ddim(out_dims)));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册