| 302 | } |
| 303 | |
| 304 | void do_copy_diff_qu4_qu4(const TensorND& dst, const TensorND& src) { |
| 305 | auto isrc = |
| 306 | tensor_iter_valonly<DTypeTrait<dtype::Quantized4Asymm>::ctype>(src).begin(); |
| 307 | auto idst = |
| 308 | tensor_iter_valonly<DTypeTrait<dtype::Quantized4Asymm>::ctype>(dst).begin(); |
| 309 | auto src_dt_parm = src.layout.dtype.param<dtype::Quantized4Asymm>(); |
| 310 | auto dst_dt_parm = dst.layout.dtype.param<dtype::Quantized4Asymm>(); |
| 311 | for (size_t i = 0, it = dst.layout.total_nr_elems(); i < it; ++i) { |
| 312 | *idst = dst_dt_parm.quantize(src_dt_parm.dequantize(uint8_t(*isrc))); |
| 313 | ++idst; |
| 314 | ++isrc; |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | void check_layout_and_canonize(TensorLayout& src, TensorLayout& dst) { |
| 319 | megdnn_assert(dst.is_non_overlapping_strong()); |
no test coverage detected