| 10 | |
| 11 | template <typename Opr> |
| 12 | HostTensorND eval_conv( |
| 13 | const std::shared_ptr<HostTensorND>& src, |
| 14 | const std::shared_ptr<HostTensorND>& filter, |
| 15 | const typename Opr::Param& param = {}) { |
| 16 | auto graph = ComputingGraph::make(); |
| 17 | graph->options().log_level = 0; |
| 18 | SymbolVar x = opr::Host2DeviceCopy::make(*graph, src); |
| 19 | SymbolVar y = opr::Host2DeviceCopy::make(*graph, filter); |
| 20 | SymbolVar z = Opr::make(x, y, param); |
| 21 | HostTensorND host_z; |
| 22 | auto func = graph->compile({make_callback_copy(z, host_z)}); |
| 23 | func->execute(); |
| 24 | |
| 25 | host_z.sync(); |
| 26 | return host_z; |
| 27 | } |
| 28 | |
| 29 | template <typename Opr> |
| 30 | HostTensorND eval_conv_cpu( |
nothing calls this directly
no test coverage detected