提交 156a89cc 编写于 作者: L Li Xinqi 提交者: GitHub

Dev op graph piece size (#1637)

* fix a bug in OpGraph::InferNoParallelBlobDesc

* fix a bug in OpGraph::InferNoParallelBlobDesc


Former-commit-id: c0b1071fc6fbe72f1207d02fdb794dc1076eb59a
上级 2733025d
......@@ -372,10 +372,13 @@ void OpGraph::InferNoParallelBlobDesc() const {
parallel_ctx.set_parallel_id(0);
parallel_ctx.set_parallel_num(1);
parallel_ctx.set_policy(op_node->parallel_desc().policy());
// the real important data we want to get is:
// a) model blobs' byte size;
// b) number of axes of blobs' body shape;
// Hence the argument record_piece_size can be any positive number, here it's 1
op_node->op().InferBlobDescsIf(
std::bind(&OpNode::NoParallelBlobDesc4BnInOp, op_node, std::placeholders::_1),
&parallel_ctx, job_desc_->RecordPieceSize() / op_node->parallel_desc().parallel_num(),
[](OpContext*) {});
&parallel_ctx, 1, [](OpContext*) {});
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册