| 69 | } |
| 70 | |
| 71 | int LITE_destroy_tensor(LiteTensor tensor) { |
| 72 | LITE_CAPI_BEGIN(); |
| 73 | LITE_ASSERT(tensor, "The tensor pass to LITE c_api is null"); |
| 74 | LITE_LOCK_GUARD(mtx_tensor); |
| 75 | auto& global_holder = get_global_tensor_holder(); |
| 76 | if (global_holder.find(tensor) != global_holder.end()) { |
| 77 | global_holder.erase(tensor); |
| 78 | } |
| 79 | LITE_CAPI_END(); |
| 80 | } |
| 81 | |
| 82 | int LITE_set_tensor_layout(LiteTensor tensor, const LiteLayout layout) { |
| 83 | LITE_CAPI_BEGIN(); |