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

Performance/zero copy variable seriralization #8839

Merged
merged 7 commits into from
Mar 9, 2018

Conversation

typhoonzero
Copy link
Contributor

@typhoonzero typhoonzero commented Mar 7, 2018

Fix #8838

Related: #8638

@typhoonzero typhoonzero changed the title Polish grpc server [WIP] Performance/zero copy variable seriralization and RPC Mar 7, 2018
void* payload;
size_t payload_size;
ProtoEncodeHelper e((char*)buf, 1024);
e.WriteString(1, name);
Copy link
Contributor

Choose a reason for hiding this comment

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

Use kvarnameFieldNumber which defined in xxx.pb.h instead of number.
And the follows are the same problem.

@gongweibao
Copy link
Contributor

Thanks for the quick implementation! It's awesome!
We need to merge it ASAP, and we can add more optimization on this basis.

#ifdef PADDLE_WITH_CUDA
platform::CPUPlace cpu;
auto& gpu_dev_ctx = static_cast<const platform::CUDADeviceContext&>(ctx);
memory::Copy(boost::get<platform::CUDAPlace>(tensor->place()),
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be optimized to copy all and wait once.I will optimize it in another PR.

@typhoonzero typhoonzero changed the title [WIP] Performance/zero copy variable seriralization and RPC Performance/zero copy variable seriralization Mar 9, 2018
Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

LGTM

@gongweibao gongweibao merged commit 45af8c1 into PaddlePaddle:develop Mar 9, 2018
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