| 571 | } |
| 572 | |
| 573 | TF_Buffer* TF_GetAllOpList() { |
| 574 | std::vector<tensorflow::OpDef> op_defs; |
| 575 | tensorflow::OpRegistry::Global()->GetRegisteredOps(&op_defs); |
| 576 | tensorflow::OpList op_list; |
| 577 | for (const auto& op : op_defs) { |
| 578 | *(op_list.add_op()) = op; |
| 579 | } |
| 580 | TF_Buffer* ret = TF_NewBuffer(); |
| 581 | TF_CHECK_OK(MessageToBuffer(op_list, ret)); |
| 582 | return ret; |
| 583 | } |
| 584 | |
| 585 | // -------------------------------------------------------------------------- |
| 586 | // ListDevices & SessionListDevices API |