| 281 | |
| 282 | |
| 283 | tflite::BuiltinOperator GetOpCode(const TfLiteParserImpl::ModelPtr& model, size_t subgraphIndex, size_t operatorIndex) |
| 284 | { |
| 285 | const auto& operatorPtr = model->subgraphs[subgraphIndex]->operators[operatorIndex]; |
| 286 | auto opcodeIndex = operatorPtr->opcode_index; |
| 287 | |
| 288 | // work around the introduction of the deprecated_builtin_code introduced in 2.4 in a backwards compatible manner |
| 289 | #if defined(ARMNN_POST_TFLITE_2_3) |
| 290 | auto opcode = std::max(model->operator_codes[opcodeIndex]->builtin_code, |
| 291 | static_cast<tflite::BuiltinOperator>(model->operator_codes[opcodeIndex]->deprecated_builtin_code)); |
| 292 | #else |
| 293 | auto opcode = model->operator_codes[opcodeIndex]->builtin_code; |
| 294 | #endif |
| 295 | return opcode; |
| 296 | } |
| 297 | |
| 298 | std::vector<unsigned int> GetUIntBuffer(armnn::TensorInfo info, |
| 299 | const TfLiteParserImpl::ModelPtr& model, |