Skip to content

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