MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / LITE_destroy_tensor

Function LITE_destroy_tensor

lite/lite-c/src/tensor.cpp:71–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71int 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
82int LITE_set_tensor_layout(LiteTensor tensor, const LiteLayout layout) {
83 LITE_CAPI_BEGIN();

Callers 1

TESTFunction · 0.85

Calls 3

findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by 1

TESTFunction · 0.68