| 196 | } |
| 197 | |
| 198 | bool IsConstantTensor(const Tensor& tensor, const Model& model) { |
| 199 | if (!tensor.buffer() || !model.buffers()) return false; |
| 200 | if (tensor.buffer() > 0 && tensor.buffer() < model.buffers()->size()) { |
| 201 | auto* buffer = model.buffers()->Get(tensor.buffer()); |
| 202 | if (buffer && buffer->data()) { |
| 203 | return true; |
| 204 | } |
| 205 | } |
| 206 | return false; |
| 207 | } |
| 208 | |
| 209 | // Performs basic consistency checks on a sub-graph. |
| 210 | bool VerifySubGraphConsistency(const Model& model, const SubGraph& subgraph, |
no test coverage detected