| 613 | } |
| 614 | |
| 615 | TensorLayout load_tensor_layout(const fbs::Tensor* tensor) { |
| 616 | TensorLayout layout; |
| 617 | if (tensor->shape()) { |
| 618 | layout.ndim = tensor->shape()->size(); |
| 619 | std::copy(tensor->shape()->begin(), tensor->shape()->end(), layout.shape); |
| 620 | } |
| 621 | if (tensor->dtype()) { |
| 622 | // modify data type inplace for TensorLayout |
| 623 | layout.modify_dtype_inplace(fbs::intl::load_dtype(tensor->dtype())); |
| 624 | } |
| 625 | layout.init_contiguous_stride(); |
| 626 | return layout; |
| 627 | } |
| 628 | |
| 629 | void GraphLoaderOSS::OprLoadContextImpl::load_tensor_value( |
| 630 | HostTensorND* dest, const TensorLayout& layout, const fbs::Tensor* tensor) { |
no test coverage detected