-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Refine error msg in paddle/fluid/framework/details [part 2] #27429
Refine error msg in paddle/fluid/framework/details [part 2] #27429
Conversation
Thanks for your contribution! |
8cfbf63
to
53b154b
Compare
0f62ca3
to
325c1b5
Compare
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.
给了一些修改建议,请查看
platform::errors::InvalidArgument( | ||
"The item at position %d of rows of SelectedRows is not equal to " | ||
"the expected, expect %d, but got %d.", | ||
k, rows[k], selected_rows.rows()[k])); |
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.
rows[k], selected_rows.rows()[k]) %ld
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
PADDLE_THROW("Type %s of %s is not supported eager deletion", | ||
framework::ToTypeName(var->Type()), var_info->Name()); | ||
PADDLE_THROW(platform::errors::Unimplemented( | ||
"The variable(%s) of type %s is not supported in eager deletion", |
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.
句号 .
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
PADDLE_ENFORCE(remote.size() == vars.size()); | ||
PADDLE_ENFORCE_EQ( | ||
client->Gather(vars, &remote, *merged_dev_ctx, scope), true, | ||
platform::errors::PreconditionNotMet("Gather() return false.")); |
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.
这个说网络通信错误之类的吧。不然函数是干啥的用户不知道啊~
platform::errors::PreconditionNotMet( | ||
"The NoDummyInputSize should be equal to the number of places.")); |
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.
打一下两个数值吧
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
platform::errors::PreconditionNotMet( | ||
"The NoDummyInputSize and NoDummyOutputSize should be equal.")); |
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.
同上
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
@@ -154,7 +186,8 @@ void SparseAllReduceOpHandle::RunImplEncoded() { | |||
PADDLE_ENFORCE_EQ(paddle::communication::dgc::sparseReduce( | |||
gather_buff, k, out_tensor_buf, | |||
static_cast<int>(out_numel), nranks_, stream), | |||
true); | |||
true, platform::errors::Unavailable( | |||
"Calling sparseReduce() failed.")); |
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.
sparseReduce也给个描述吧
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.
函数名字说明了是以reduce方式进行稀释归约。
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.
LGTM
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.
LGTM
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.
LGTM
PR types
Others
PR changes
Others
Describe
Refine error msg in paddle/fluid/framework/details, part 2.
Related #25631