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

Function TEST

lite/test/test_lar_fast_run_options.cpp:16–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14} // anonymous namespace
15
16TEST(TestLarFastRun, FAST_RUN) {
17 double heristic_time = 0, fast_run_time = 0;
18 lite::Timer timer("profile");
19 {
20 std::string model_path = "./shufflenet.mge";
21 timer.reset_start();
22 TEST_INT32_OPTION(iter, 1);
23 heristic_time = timer.get_used_time();
24 }
25
26 {
27 std::string model_path = "./shufflenet.mge";
28 timer.reset_start();
29 DEFINE_INT32_WRAP(iter, 1);
30 TEST_BOOL_OPTION(fast_run);
31 fast_run_time = timer.get_used_time();
32 }
33 //! profile time is longer than excute time
34 ASSERT_LT(heristic_time, fast_run_time);
35}
36
37TEST(TestLarFastRun, FAST_RUN_LITE) {
38 double heristic_time = 0, fast_run_time = 0;

Callers

nothing calls this directly

Calls 4

instFunction · 0.85
get_cacheMethod · 0.80
reset_startMethod · 0.45
get_used_timeMethod · 0.45

Tested by

no test coverage detected