CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[buaa]【Error Message No.32 No.33】rewrite error message #66957
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
85a1d11
to
bdbff73
Compare
@@ -992,6 +992,10 @@ void HogwildWorker::CreateThreadScope(const ProgramDesc &program) { | |||
if (stat_var_name_map_.find(name) != stat_var_name_map_.end()) { | |||
Variable *root_var = root_scope_->FindVar(name); | |||
CHECK(root_var != nullptr); |
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.
原来的不删一下么?
@@ -992,6 +992,10 @@ void HogwildWorker::CreateThreadScope(const ProgramDesc &program) { | |||
if (stat_var_name_map_.find(name) != stat_var_name_map_.end()) { | |||
Variable *root_var = root_scope_->FindVar(name); | |||
CHECK(root_var != nullptr); | |||
PADDLE_ENFORCE_EQ( | |||
root_var != nullptr, |
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.
这里为啥不直接用 PADDLE_ENFORCE_NE
?
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.
使用合适的 PADDLE_ENFORCE
会使报错更友好
@@ -991,7 +991,10 @@ void HogwildWorker::CreateThreadScope(const ProgramDesc &program) { | |||
++persist_total; | |||
if (stat_var_name_map_.find(name) != stat_var_name_map_.end()) { | |||
Variable *root_var = root_scope_->FindVar(name); | |||
CHECK(root_var != nullptr); | |||
PADDLE_ENFORCE_NE( |
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.
喔,这里可以直接用 PADDLE_ENFORCE_NOT_NULL
++persist_reset; | ||
} | ||
} else { | ||
auto *ptr = thread_scope_->Var(name); | ||
CHECK(proto::VarType::LOD_TENSOR == var->GetType()); | ||
PADDLE_ENFORCE_EQ(proto::VarType::LOD_TENSOR == var->GetType(), |
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.
这个 EQ 直接接收 ==
两侧的就好了啊
paddle/fluid/inference/tensorrt/convert/generic_and_custom_plugin_creater.cc
Outdated
Show resolved
Hide resolved
paddle/fluid/inference/tensorrt/convert/test_custom_op_plugin.h
Outdated
Show resolved
Hide resolved
paddle/fluid/inference/tensorrt/convert/test_custom_op_plugin.h
Outdated
Show resolved
Hide resolved
paddle/fluid/inference/tensorrt/convert/test_custom_op_plugin.h
Outdated
Show resolved
Hide resolved
paddle/fluid/inference/tensorrt/convert/test_custom_op_plugin.h
Outdated
Show resolved
Hide resolved
paddle/fluid/inference/tensorrt/convert/test_custom_op_plugin.h
Outdated
Show resolved
Hide resolved
…66957) * first try fix fix * phi * fix * fix equal * fix equal * unchase test_custom_op_plugin.h * Update test_custom_op_plugin.h
PR Category
User Experience
PR Types
others
Description
修改报错信息