make a pair of functions with and without JIT optimization
| 84 | |
| 85 | //! make a pair of functions with and without JIT optimization |
| 86 | std::pair<std::unique_ptr<cg::AsyncExecutable>, std::unique_ptr<cg::AsyncExecutable>> |
| 87 | make_func_pair( |
| 88 | HostTensorND& dst0, HostTensorND& dst1, |
| 89 | thin_function<SymbolVar(ComputingGraph&)> make_dst, uint8_t jit_level) { |
| 90 | auto g0 = ComputingGraph::make(); |
| 91 | g0->options().graph_opt_level = 0; |
| 92 | auto f0 = g0->compile({make_callback_copy(make_dst(*g0), dst0)}); |
| 93 | |
| 94 | auto g1 = ComputingGraph::make(); |
| 95 | g1->options().graph_opt_level = 3; |
| 96 | g1->options().graph_opt.jit = jit_level; |
| 97 | auto f1 = g1->compile({make_callback_copy(make_dst(*g1), dst1)}); |
| 98 | |
| 99 | EXPECT_FALSE(find_oprs<JITExecutor>(*f1).empty()); |
| 100 | return {std::move(f0), std::move(f1)}; |
| 101 | } |
| 102 | |
| 103 | template <> |
| 104 | void run<void>(Backend, CompNode) {} |
no test coverage detected