| 6 | namespace serialization { |
| 7 | |
| 8 | bool is_fbs_file(InputFile& file) { |
| 9 | //! check whether the model format is flatbuffer v2 |
| 10 | uint64_t magic_with_reserved = 0; |
| 11 | file.read(&magic_with_reserved, sizeof(magic_with_reserved)); |
| 12 | file.skip(-sizeof(magic_with_reserved)); |
| 13 | return (magic_with_reserved == MGB_MAGIC) || (magic_with_reserved == MAGIC_V0); |
| 14 | } |
| 15 | |
| 16 | void check_tensor_value_valid(const std::string& name, const HostTensorND& tensor) { |
| 17 | bool cond_normal = tensor.layout().format.is_default() && |
no test coverage detected