| 1578 | } |
| 1579 | |
| 1580 | void TF_GraphGetOpDef(TF_Graph* graph, const char* op_name, |
| 1581 | TF_Buffer* output_op_def, TF_Status* status) { |
| 1582 | const OpDef* op_def; |
| 1583 | { |
| 1584 | mutex_lock l(graph->mu); |
| 1585 | status->status = graph->graph.op_registry()->LookUpOpDef(op_name, &op_def); |
| 1586 | if (TF_GetCode(status) != TF_OK) return; |
| 1587 | } |
| 1588 | status->status = MessageToBuffer(*op_def, output_op_def); |
| 1589 | } |
| 1590 | |
| 1591 | void TF_GraphVersions(TF_Graph* graph, TF_Buffer* output_version_def, |
| 1592 | TF_Status* status) { |