diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2021-10-07 11:48:58 +0100 |
---|---|---|
committer | Matthew Sloyan <matthew.sloyan@arm.com> | 2021-10-07 12:59:17 +0100 |
commit | 4d217c02fe2c0a32ff9da69d8fe375a75173c0f3 (patch) | |
tree | c8c7b34da1d6f1ce3a1cc9866203c108568e411c /src/armnnTfLiteParser/TfLiteParser.hpp | |
parent | eb70c91a4180b1b437040b00296ff0065de6f051 (diff) | |
download | armnn-4d217c02fe2c0a32ff9da69d8fe375a75173c0f3.tar.gz |
IVGCVSW-6461 Building Arm NN failed after adding Conv3d to TFLiteparser
* Add hash define to Conv3d for backwards compatibility when compiling
with TF 2.3.1
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I70eec3b26430240852938af34b065b32bab91ebe
Diffstat (limited to 'src/armnnTfLiteParser/TfLiteParser.hpp')
-rw-r--r-- | src/armnnTfLiteParser/TfLiteParser.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/armnnTfLiteParser/TfLiteParser.hpp b/src/armnnTfLiteParser/TfLiteParser.hpp index 8eb529963b..3d4fd6504f 100644 --- a/src/armnnTfLiteParser/TfLiteParser.hpp +++ b/src/armnnTfLiteParser/TfLiteParser.hpp @@ -13,6 +13,12 @@ #include <unordered_map> #include <vector> +#include <tensorflow/lite/version.h> + +#if TF_MAJOR_VERSION > 2 || (TF_MAJOR_VERSION == 2 && TF_MINOR_VERSION > 3) +#define ARMNN_POST_TFLITE_2_3 +#endif + namespace armnnTfLiteParser { @@ -113,7 +119,10 @@ private: void ParseComparison(size_t subgraphIndex, size_t operatorIndex, armnn::ComparisonOperation comparisonOperation); void ParseConcatenation(size_t subgraphIndex, size_t operatorIndex); void ParseConv2D(size_t subgraphIndex, size_t operatorIndex); + // Conv3D support was added in TF 2.5, so for backwards compatibility a hash define is needed. + #if defined(ARMNN_POST_TFLITE_2_3) void ParseConv3D(size_t subgraphIndex, size_t operatorIndex); + #endif void ParseDepthToSpace(size_t subgraphIndex, size_t operatorIndex); void ParseDepthwiseConv2D(size_t subgraphIndex, size_t operatorIndex); void ParseDequantize(size_t subgraphIndex, size_t operatorIndex); |