| 524 | } |
| 525 | |
| 526 | NodeDef* 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. |
| 540 | NodeDef* AddControlTrigger(const PartitionOptions& opts, GraphDef* gdef, |
no test coverage detected