-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add op type in check nan/inf #15986
add op type in check nan/inf #15986
Conversation
test=develop
paddle/fluid/framework/operator.cc
Outdated
@@ -882,7 +882,8 @@ class RuntimeInferShapeContext : public InferShapeContext { | |||
const RuntimeContext& ctx_; | |||
}; | |||
|
|||
static void CheckTensorNANOrInf(const std::string& name, | |||
static void CheckTensorNANOrInf(const std::string& type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name it op_type
should be easy to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
} else if (var->IsType<framework::SelectedRows>()) { | ||
CheckTensorNANOrInf(vname, var->Get<framework::SelectedRows>().value()); | ||
CheckTensorNANOrInf(type_, vname, | ||
var->Get<framework::SelectedRows>().value()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, if we set the FLAGS_check_nan_inf=1
and GLOG_vmodule=operator=4
, we can know the nan/inf
is happend in which op.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I'm agreed. But it may print much more logs I will not expect.
* add op name in check nan/inf, test=develop
No description provided.