| 268 | } |
| 269 | |
| 270 | static int _getBytes(const CoreFunctions* core, const Tensor* output) { |
| 271 | auto bytes = output->getType().bytes(); |
| 272 | auto quant = TensorUtils::getDescribe(output)->quantAttr.get(); |
| 273 | if (output->getType().code == halide_type_float) { |
| 274 | bytes = core->bytes; |
| 275 | } |
| 276 | if (nullptr != quant && TensorUtils::getDescribe(output)->applyQuant) { |
| 277 | bytes = 1; |
| 278 | } |
| 279 | return bytes; |
| 280 | } |
| 281 | ErrorCode CPUTensorConverter::convert(const Tensor* input, const Tensor* output, const CoreFunctions* core, int tId, int numberThread) { |
| 282 | auto ib = input->buffer(); |
| 283 | auto ob = output->buffer(); |