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