Skip to content

Commit 0f586c4

Browse files
authored
[PHI]Fix paddle.broadcast_tensors to support big Tensor
1 parent b86f58b commit 0f586c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

paddle/phi/infermeta/multiary.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,13 +1178,13 @@ void BroadcastTensorsInferMeta(const std::vector<const MetaTensor*>& x,
11781178
// Loop axes in reverse order,
11791179
// For each axis, take the maximum as target size
11801180
// Fill size = 1 if shape vector exhausts
1181-
int target_dim_size = 1;
1181+
int64_t target_dim_size = 1;
11821182
for (const auto& input_ddim : input_dims) {
11831183
// Reversed order
11841184
int axis = static_cast<int>(input_ddim.size()) - index - 1;
1185-
int dim_size = 1;
1185+
int64_t dim_size = 1;
11861186
if (axis >= 0) {
1187-
dim_size = static_cast<int>(input_ddim[axis]);
1187+
dim_size = static_cast<int64_t>(input_ddim[axis]);
11881188
}
11891189

11901190
if (target_dim_size != 1 && dim_size != 1 &&

0 commit comments

Comments
 (0)