aboutsummaryrefslogtreecommitdiff
path: root/src/armnnDeserializeParser/DeserializeParser.hpp
diff options
context:
space:
mode:
authorNattapat Chaimanowong <nattapat.chaimanowong@arm.com>2019-02-13 15:56:24 +0000
committerLes Bell <les.bell@arm.com>2019-02-15 14:00:05 +0000
commit43e7864cf81cd55fb53f8b98b4d387da859eae0d (patch)
treef83b4ab088155598cf9069ceb8f28d4e27b601ce /src/armnnDeserializeParser/DeserializeParser.hpp
parentcb8a3219331c8eb89dcdfbcdb2569c0e9ecdcf4e (diff)
downloadarmnn-43e7864cf81cd55fb53f8b98b4d387da859eae0d.tar.gz
IVGCVSW-2724 Fix bug in DeserializeParser
* Fixed error in which DeserializeParser::LoadGraphFromFile returns a pointer to a local variable in its scope Change-Id: Ic928b8509c0ae76570f0527b17e050b46327fe0c Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com>
Diffstat (limited to 'src/armnnDeserializeParser/DeserializeParser.hpp')
-rw-r--r--src/armnnDeserializeParser/DeserializeParser.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/armnnDeserializeParser/DeserializeParser.hpp b/src/armnnDeserializeParser/DeserializeParser.hpp
index 9edd959220..ce343dc528 100644
--- a/src/armnnDeserializeParser/DeserializeParser.hpp
+++ b/src/armnnDeserializeParser/DeserializeParser.hpp
@@ -42,7 +42,7 @@ public:
public:
// testable helpers
- static GraphPtr LoadGraphFromFile(const char* fileName);
+ static GraphPtr LoadGraphFromFile(const char* fileName, std::string& fileContent);
static GraphPtr LoadGraphFromBinary(const uint8_t* binaryContent, size_t len);
static TensorRawPtrVector GetInputs(const GraphPtr& graph, unsigned int layerIndex);
static TensorRawPtrVector GetOutputs(const GraphPtr& graph, unsigned int layerIndex);
@@ -82,6 +82,10 @@ private:
GraphPtr m_Graph;
std::vector<LayerParsingFunction> m_ParserFunctions;
+ /// This holds the data of the file that was read in from CreateNetworkFromBinaryFile
+ /// Needed for m_Graph to point to
+ std::string m_FileContent;
+
/// A mapping of an output slot to each of the input slots it should be connected to
/// The outputSlot is from the layer that creates this tensor as one of its outputs
/// The inputSlots are from the layers that use this tensor as one of their inputs