| 14 | } // anonymous namespace |
| 15 | |
| 16 | TEST(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 | |
| 37 | TEST(TestLarFastRun, FAST_RUN_LITE) { |
| 38 | double heristic_time = 0, fast_run_time = 0; |
nothing calls this directly
no test coverage detected