MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / BuildExecGphAndRegst

Method BuildExecGphAndRegst

oneflow/core/graph/boxing_zeros_task_node.cpp:41–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void BoxingZerosTaskNode::BuildExecGphAndRegst() {
42 ExecNode* node = mut_exec_gph().NewNode();
43 OperatorConf op_conf;
44 op_conf.set_name("System-Boxing-Zeros-" + NewUniqueId());
45 op_conf.set_device_tag(*CHECK_JUST(DeviceTag4DeviceType(this->device_type())));
46 *op_conf.mutable_boxing_zeros_conf()->mutable_lbi() = lbi();
47 shape_.ToProto(op_conf.mutable_boxing_zeros_conf()->mutable_shape());
48 op_conf.mutable_boxing_zeros_conf()->set_data_type(data_type_);
49 std::shared_ptr<Operator> sole_op = CHECK_JUST(ConstructOp(op_conf));
50 node->mut_op() = sole_op;
51 std::shared_ptr<RegstDesc> out_regst = GetProducedRegst("out");
52 out_regst->AddLbi(sole_op->BnInOp2Lbi(sole_op->SoleObn()));
53 node->BindBnWithRegst(sole_op->SoleObn(), out_regst);
54 (node->*GetInferBlobDescsMethod())(nullptr);
55}
56
57void BoxingZerosTaskNode::InferProducedDataRegstTimeShape() {
58 GetProducedRegst("out")->mut_data_regst_time_shape()->reset(new Shape(time_shape_));

Callers

nothing calls this directly

Calls 10

NewUniqueIdFunction · 0.85
DeviceTag4DeviceTypeFunction · 0.85
ConstructOpFunction · 0.85
NewNodeMethod · 0.80
mut_opMethod · 0.80
BindBnWithRegstMethod · 0.80
device_typeMethod · 0.45
ToProtoMethod · 0.45
set_data_typeMethod · 0.45
AddLbiMethod · 0.45

Tested by

no test coverage detected