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

Function LITE_set_tensor_layout

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

Source from the content-addressed store, hash-verified

80}
81
82int LITE_set_tensor_layout(LiteTensor tensor, const LiteLayout layout) {
83 LITE_CAPI_BEGIN();
84 LITE_ASSERT(tensor, "The tensor pass to LITE c_api is null");
85 auto tensor_ptr = static_cast<lite::Tensor*>(tensor);
86 tensor_ptr->set_layout(convert_to_layout(layout));
87 LITE_CAPI_END();
88}
89
90int LITE_reset_tensor_memory(
91 LiteTensor tensor, void* prepared_data, size_t data_length_in_byte) {

Callers 1

TESTFunction · 0.85

Calls 2

convert_to_layoutFunction · 0.85
set_layoutMethod · 0.45

Tested by 1

TESTFunction · 0.68