Skip to content

Commit

Permalink
add set_dtype for inverse_op (#44618)
Browse files Browse the repository at this point in the history
  • Loading branch information
freeliuzc authored Jul 27, 2022
1 parent a71cfd8 commit ce7c799
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions paddle/phi/infermeta/backward.cc
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ void InverseGradInferMeta(const MetaTensor& out,
MetaTensor* dx) {
if (dx) {
dx->set_dims(dout.dims());
dx->set_dtype(out.dtype());
}
}

Expand Down
1 change: 1 addition & 0 deletions paddle/phi/infermeta/unary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,7 @@ void InverseInferMeta(const MetaTensor& x, MetaTensor* out) {
}

out->set_dims(input_dims);
out->set_dtype(x.dtype());
out->share_lod(x);
}

Expand Down

0 comments on commit ce7c799

Please sign in to comment.