Skip to content
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

Merged
merged 8 commits into from
Sep 27, 2020

Conversation

zhiqiu
Copy link
Contributor

@zhiqiu zhiqiu commented Sep 21, 2020

PR types

Others

PR changes

Others

Describe

Refine error msg in paddle/fluid/framework/details, part 2.
Related #25631

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@zhiqiu zhiqiu force-pushed the dev/refine_error_msg_in_details2 branch from 8cfbf63 to 53b154b Compare September 21, 2020 11:47
@zhiqiu zhiqiu closed this Sep 23, 2020
@zhiqiu zhiqiu reopened this Sep 23, 2020
@zhiqiu zhiqiu closed this Sep 23, 2020
@zhiqiu zhiqiu reopened this Sep 23, 2020
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Sep 23, 2020
@PaddlePaddle PaddlePaddle unlocked this conversation Sep 23, 2020
@zhiqiu zhiqiu force-pushed the dev/refine_error_msg_in_details2 branch from 0f62ca3 to 325c1b5 Compare September 25, 2020 10:00
Copy link
Contributor

@wanghuancoder wanghuancoder left a 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]));
Copy link
Contributor

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

Copy link
Contributor Author

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",
Copy link
Contributor

Choose a reason for hiding this comment

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

句号 .

Copy link
Contributor Author

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."));
Copy link
Contributor

Choose a reason for hiding this comment

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

这个说网络通信错误之类的吧。不然函数是干啥的用户不知道啊~

Comment on lines 74 to 75
platform::errors::PreconditionNotMet(
"The NoDummyInputSize should be equal to the number of places."));
Copy link
Contributor

Choose a reason for hiding this comment

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

打一下两个数值吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 78 to 79
platform::errors::PreconditionNotMet(
"The NoDummyInputSize and NoDummyOutputSize should be equal."));
Copy link
Contributor

Choose a reason for hiding this comment

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

同上

Copy link
Contributor Author

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."));
Copy link
Contributor

Choose a reason for hiding this comment

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

sparseReduce也给个描述吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

函数名字说明了是以reduce方式进行稀释归约。

Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@wanghuancoder wanghuancoder left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhiqiu zhiqiu merged commit 3507496 into PaddlePaddle:develop Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants