Skip to content

Commit

Permalink
Fix paddle.mode and paddle.bincount API (PaddlePaddle#63970)
Browse files Browse the repository at this point in the history
* fix_infermeta

* Update binary.cc

* Update binary.cc

* Update binary.cc

* Update binary.cc

* Update binary.cc

* ci
  • Loading branch information
xingmingyyj authored and co63oc committed May 10, 2024
1 parent b89cb1a commit 5db5d07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion paddle/phi/infermeta/binary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void BincountInferMeta(const MetaTensor& x,
if (weights) {
out->set_dtype(weights.dtype());
} else {
out->set_dtype(x.dtype());
out->set_dtype(DataType::INT64);
}

out->share_lod(x);
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/infermeta/unary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@ void ModeInferMeta(const MetaTensor& x,

indices->set_dims(dims);
indices->share_lod(x);
indices->set_dtype(x.dtype());
indices->set_dtype(DataType::INT64);
}

void MultinomialInferMeta(const MetaTensor& x,
Expand Down

0 comments on commit 5db5d07

Please sign in to comment.