MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AddDummyConst

Function AddDummyConst

tensorflow/core/graph/graph_partition.cc:526–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526NodeDef* AddDummyConst(const PartitionOptions& opts, GraphDef* gdef,
527 const Edge* edge, Status* status) {
528 const Node* src = edge->src();
529 Tensor tensor(DT_FLOAT, TensorShape({0}));
530 NodeDef* result = gdef->add_node();
531 *status = NodeDefBuilder(opts.new_name(src->name()), "Const")
532 .Device(src->assigned_device_name())
533 .Attr("dtype", DT_FLOAT)
534 .Attr("value", tensor)
535 .Finalize(result, /*consume=*/true);
536 return result;
537}
538
539// A dummy node for scheduling.
540NodeDef* AddControlTrigger(const PartitionOptions& opts, GraphDef* gdef,

Callers 2

PartitionFunction · 0.85
PartitionWithTensorFuseFunction · 0.85

Calls 8

NodeDefBuilderClass · 0.85
nameMethod · 0.65
TensorShapeClass · 0.50
srcMethod · 0.45
FinalizeMethod · 0.45
AttrMethod · 0.45
DeviceMethod · 0.45
new_nameMethod · 0.45

Tested by

no test coverage detected