Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix true_divide logging #18393

Merged
merged 1 commit into from
May 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/operator/numpy/np_true_divide-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void TrueDivideElemwiseCompute(const nnvm::NodeAttrs &attrs,
// Case when types of the 2 input tensors are different
if (common::is_float(lhs.type_flag_) && common::is_float(rhs.type_flag_)) {
// both lhs and rhs are float types, output type is the more precise one
LOG(ERROR) << "not implemented yet...";
LOG(FATAL) << "not implemented yet...";
} else if (common::is_float(lhs.type_flag_) || common::is_float(rhs.type_flag_)) {
// one is float type, the other is integer type, the output type should be the same as float
CHECK_EQ(out.type_flag_,
Expand Down Expand Up @@ -154,14 +154,14 @@ void TrueDivideElemwiseCompute(const nnvm::NodeAttrs &attrs,
}
} else {
// lhs is integer type, rhs is integer type, output type should be float
LOG(ERROR) << "not implemented yet...";
LOG(FATAL) << "not implemented yet...";
}
#else
// Windows case: using temp space for casting the type
// Case when types of the 2 input tensors are different
if (common::is_float(lhs.type_flag_) && common::is_float(rhs.type_flag_)) {
// both lhs and rhs are float types, output type is the more precise one
LOG(ERROR) << "not implemented yet...";
LOG(FATAL) << "not implemented yet...";
} else if (common::is_float(lhs.type_flag_) || common::is_float(rhs.type_flag_)) {
// lhs is float type, rhs is integer type, the output type should be the same as lhs
CHECK_EQ(out.type_flag_,
Expand Down Expand Up @@ -191,7 +191,7 @@ void TrueDivideElemwiseCompute(const nnvm::NodeAttrs &attrs,
}
} else {
// lhs is integer type, rhs is integer type, output type should be float
LOG(ERROR) << "not implemented yet...";
LOG(FATAL) << "not implemented yet...";
}
#endif
}
Expand Down Expand Up @@ -245,7 +245,7 @@ void TrueDivideBroadcastCompute(const nnvm::NodeAttrs& attrs,
} else {
if (common::is_float(lhs.type_flag_) && common::is_float(rhs.type_flag_)) {
// lhs and rhs have different float types, the output is the more precise one
LOG(ERROR) << "not implemented yet...";
LOG(FATAL) << "not implemented yet...";
} else if (common::is_float(lhs.type_flag_) || common::is_float(rhs.type_flag_)) {
// one of lhs and rhs is float, the output is the same type as the float one
if (common::is_float(lhs.type_flag_)) {
Expand Down Expand Up @@ -273,7 +273,7 @@ void TrueDivideBroadcastCompute(const nnvm::NodeAttrs& attrs,
}
} else {
// lhs and rhs have different integer types, the output is float type
LOG(ERROR) << "not implemented yet...";
LOG(FATAL) << "not implemented yet...";
}
}
});
Expand Down Expand Up @@ -306,7 +306,7 @@ void TrueDivideBroadcastCompute(const nnvm::NodeAttrs& attrs,
} else {
if (common::is_float(lhs.type_flag_) && common::is_float(rhs.type_flag_)) {
// lhs and rhs have different float types, the output is the more precise one
LOG(ERROR) << "not implemented yet...";
LOG(FATAL) << "not implemented yet...";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use

LOG(FATAL) << "NotImplementedError: xxx setting for yyy op is not implemented yet.";

} else if (common::is_float(lhs.type_flag_) || common::is_float(rhs.type_flag_)) {
// one of lhs and rhs is float, the output is the same type as the float one
TBlob temp_tblob;
Expand Down Expand Up @@ -337,7 +337,7 @@ void TrueDivideBroadcastCompute(const nnvm::NodeAttrs& attrs,
}
} else {
// lhs and rhs have different integer types, the output is float type
LOG(ERROR) << "not implemented yet...";
LOG(FATAL) << "not implemented yet...";
}
}
#endif
Expand Down