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 serde code #10531

Merged
merged 3 commits into from
May 10, 2018
Merged

Conversation

typhoonzero
Copy link
Contributor

@typhoonzero typhoonzero commented May 9, 2018

Still WIP, @gongweibao this fix the variable_response.cc proto message varints length bug, reference: https://developers.google.com/protocol-buffers/docs/encoding#packed

Part work of #9766

@typhoonzero typhoonzero changed the title Refine serde code [WIP] Refine serde code May 9, 2018
@typhoonzero typhoonzero changed the title [WIP] Refine serde code Refine serde code May 10, 2018
if (!out_name.empty()) {
e.WriteString(VarMsg::kOutVarnameFieldNumber, out_name);
if (platform::is_gpu_place(ctx.GetPlace())) {
// GPU data is copied to CPU buffer when sending,
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to surround this block by ifdef PADDLE_WITH_CUDA .

Copy link
Contributor Author

@typhoonzero typhoonzero May 10, 2018

Choose a reason for hiding this comment

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

It's not cuda codes actually in this block, only to free cpu memory.

Copy link
Contributor

@Yancey1989 Yancey1989 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants