| 551 | } |
| 552 | |
| 553 | TF_Library* TF_LoadLibrary(const char* library_filename, TF_Status* status) { |
| 554 | TF_Library* lib_handle = new TF_Library; |
| 555 | status->status = tensorflow::LoadLibrary( |
| 556 | library_filename, &lib_handle->lib_handle, &lib_handle->op_list.data, |
| 557 | &lib_handle->op_list.length); |
| 558 | if (TF_GetCode(status) != TF_OK) { |
| 559 | delete lib_handle; |
| 560 | return nullptr; |
| 561 | } |
| 562 | return lib_handle; |
| 563 | } |
| 564 | |
| 565 | TF_Buffer TF_GetOpList(TF_Library* lib_handle) { return lib_handle->op_list; } |
| 566 |