| 28 | |
| 29 | template <typename Opr> |
| 30 | HostTensorND eval_conv_cpu( |
| 31 | const HostTensorND& xv, const HostTensorND& fv, |
| 32 | const typename Opr::Param& param = {}) { |
| 33 | auto cn = CompNode::load("cpux"); |
| 34 | auto src = std::make_shared<HostTensorND>(cn, xv.layout()), |
| 35 | filter = std::make_shared<HostTensorND>(cn, fv.layout()); |
| 36 | memcpy(src->raw_ptr(), xv.raw_ptr(), xv.layout().span().dist_byte()); |
| 37 | memcpy(filter->raw_ptr(), fv.raw_ptr(), fv.layout().span().dist_byte()); |
| 38 | return eval_conv<Opr>(src, filter, param); |
| 39 | } |
| 40 | |
| 41 | //! test CompNodeSeqRecorder |
| 42 | namespace seq_rec { |