Skip to content

Commit

Permalink
revert dtype layout change to fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenwhql committed Oct 22, 2021
1 parent 24ef6c5 commit 1685b67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion paddle/pten/common/data_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ inline std::ostream& operator<<(std::ostream& os, DataType dtype) {
return os;
}

inline DataType& operator++(DataType dtype, int) {
inline DataType& operator++(DataType& dtype, int) {
dtype =
DataType(static_cast<std::underlying_type<DataType>::type>(dtype) + 1);
return dtype;
Expand Down
2 changes: 1 addition & 1 deletion paddle/pten/common/layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ inline std::ostream& operator<<(std::ostream& os, DataLayout layout) {
return os;
}

inline DataLayout& operator++(DataLayout layout, int) {
inline DataLayout& operator++(DataLayout& layout, int) {
layout = DataLayout(
static_cast<std::underlying_type<DataLayout>::type>(layout) + 1);
return layout;
Expand Down

0 comments on commit 1685b67

Please sign in to comment.