提交 a88cc462 编写于 作者: T typhoonzero

update

上级 972a102b
...@@ -146,8 +146,9 @@ class GrpcByteBufferSource ...@@ -146,8 +146,9 @@ class GrpcByteBufferSource
class GrpcByteBufferSourceWrapper : public Source { class GrpcByteBufferSourceWrapper : public Source {
public: public:
GrpcByteBufferSourceWrapper(GrpcByteBufferSource* source) : source_(source) {} explicit GrpcByteBufferSourceWrapper(GrpcByteBufferSource* source)
virtual ::google::protobuf::io::ZeroCopyInputStream* contents() override { : source_(source) {}
::google::protobuf::io::ZeroCopyInputStream* contents() override {
return source_; return source_;
} }
......
...@@ -21,15 +21,11 @@ limitations under the License. */ ...@@ -21,15 +21,11 @@ limitations under the License. */
#include "paddle/fluid/framework/scope.h" #include "paddle/fluid/framework/scope.h"
#include "paddle/fluid/framework/selected_rows.h" #include "paddle/fluid/framework/selected_rows.h"
#include "paddle/fluid/framework/var_type.h" #include "paddle/fluid/framework/var_type.h"
#include "paddle/fluid/operators/detail/sendrecvop_utils.h" #include "paddle/fluid/operators/detail/grpc_service.h"
#include "paddle/fluid/operators/detail/simple_block_queue.h"
#include "paddle/fluid/operators/detail/send_recv.grpc.pb.h" #include "paddle/fluid/operators/detail/send_recv.grpc.pb.h"
#include "paddle/fluid/operators/detail/send_recv.pb.h" #include "paddle/fluid/operators/detail/send_recv.pb.h"
#include "paddle/fluid/operators/detail/sendrecvop_utils.h"
#include "paddle/fluid/operators/detail/grpc_service.h" #include "paddle/fluid/operators/detail/simple_block_queue.h"
//#include <grpc/support/log.h>
namespace paddle { namespace paddle {
namespace operators { namespace operators {
......
...@@ -81,7 +81,7 @@ void RunSerdeTestSelectedRows(platform::Place place) { ...@@ -81,7 +81,7 @@ void RunSerdeTestSelectedRows(platform::Place place) {
// operators::detail::DeserializeFromByteBuffer(msg, ctx, &var2); // operators::detail::DeserializeFromByteBuffer(msg, ctx, &var2);
framework::Scope scope; framework::Scope scope;
scope.Var("myvar"); scope.Var("myvar");
operators::detail::TensorResponse resp(&scope, &ctx); operators::detail::VariableResponse resp(&scope, &ctx);
EXPECT_EQ(resp.Parse(msg), 0); EXPECT_EQ(resp.Parse(msg), 0);
framework::Variable* var2 = resp.GetVar(); framework::Variable* var2 = resp.GetVar();
...@@ -166,7 +166,7 @@ void RunTestLodTensor(platform::Place place, int from_type = 0) { ...@@ -166,7 +166,7 @@ void RunTestLodTensor(platform::Place place, int from_type = 0) {
// deserialize zero-copy // deserialize zero-copy
framework::Scope scope; framework::Scope scope;
scope.Var("myvar"); scope.Var("myvar");
operators::detail::TensorResponse resp(&scope, &ctx); operators::detail::VariableResponse resp(&scope, &ctx);
if (from_type == 0) { if (from_type == 0) {
EXPECT_EQ(resp.Parse(msg), 0); EXPECT_EQ(resp.Parse(msg), 0);
} else { } else {
......
...@@ -36,9 +36,9 @@ class VariableResponse { ...@@ -36,9 +36,9 @@ class VariableResponse {
public: public:
VariableResponse(const framework::Scope* scope, VariableResponse(const framework::Scope* scope,
const platform::DeviceContext* dev_ctx) const platform::DeviceContext* dev_ctx)
: scope_(scope), dev_ctx_(dev_ctx){}; : scope_(scope), dev_ctx_(dev_ctx) {}
virtual ~VariableResponse(){}; virtual ~VariableResponse() {}
// return: // return:
// 0:ok. // 0:ok.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册