提交 57f666fb 编写于 作者: T typhoonzero

update

上级 c66c65cb
...@@ -30,8 +30,9 @@ USE_OP(sum); ...@@ -30,8 +30,9 @@ USE_OP(sum);
// global for simplicity. // global for simplicity.
std::unique_ptr<paddle::framework::OperatorBase> recv_op; std::unique_ptr<paddle::framework::OperatorBase> recv_op;
int benchmark_count = 100000; int benchmark_count = 1000;
int mat_size = 10; // FIXME(typhoonzero): protobuf message size limits the maximum tensor size
int mat_size = 512;
void InitTensorsInScope(paddle::framework::Scope &scope, void InitTensorsInScope(paddle::framework::Scope &scope,
paddle::platform::CPUPlace &place) { paddle::platform::CPUPlace &place) {
...@@ -47,7 +48,7 @@ void InitTensorsInScope(paddle::framework::Scope &scope, ...@@ -47,7 +48,7 @@ void InitTensorsInScope(paddle::framework::Scope &scope,
auto out_var = scope.Var("Out"); auto out_var = scope.Var("Out");
auto out_tensor = out_var->GetMutable<paddle::framework::LoDTensor>(); auto out_tensor = out_var->GetMutable<paddle::framework::LoDTensor>();
out_tensor->Resize({mat_size, mat_size}); out_tensor->Resize({mat_size, mat_size});
tensor->mutable_data<float>(place); // allocate out_tensor->mutable_data<float>(place); // allocate
} }
void AddOp(const std::string &type, void AddOp(const std::string &type,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册