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

Function finish_callback_with_data

lite/test/test_network_c.cpp:139–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137
138volatile bool finish_checked_with_data = false;
139int finish_callback_with_data(
140 const LiteIO* outputs, const LiteTensor* output_tensors, size_t size,
141 void* user_data) {
142 finish_checked_with_data = true;
143 auto check_func = [&]() {
144 if (user_data != NULL) {
145 std::cout << "finish_callback user_data addr=" << std::hex << user_data
146 << std::endl;
147 }
148 ASSERT_EQ(size, 1);
149 ASSERT_EQ(
150 std::string(outputs->name),
151 "TRUE_DIV(EXP[12065],reduce0[12067])[12077]");
152 LiteLayout layout;
153 LITE_get_tensor_layout(*output_tensors, &layout);
154 ASSERT_EQ(layout.shapes[1], 1000);
155 };
156 check_func();
157 return 0;
158}
159
160} // namespace
161

Callers

nothing calls this directly

Calls 1

LITE_get_tensor_layoutFunction · 0.85

Tested by

no test coverage detected