aboutsummaryrefslogtreecommitdiff
path: root/Utils.hpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2019-12-13 14:43:24 +0000
committerJim Flynn Arm <jim.flynn@arm.com>2019-12-13 17:10:15 +0000
commit4d3a24bc3a4900db8a647881b0b3a7a6bf387751 (patch)
tree2a143095aef27ae1d3b574c7ac0c49122e163269 /Utils.hpp
parent1d042180e7af77e9a43b487631e775c3b92f3df8 (diff)
downloadandroid-nn-driver-4d3a24bc3a4900db8a647881b0b3a7a6bf387751.tar.gz
IVGCVSW-4270 Change .dot file name to start with netId
* .dot file will start with the same number as the associated input and output tensor dump files Change-Id: Ic64539854c2b8c34a7034fa18a142b2dfe67df7d Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'Utils.hpp')
-rw-r--r--Utils.hpp38
1 files changed, 1 insertions, 37 deletions
diff --git a/Utils.hpp b/Utils.hpp
index 267e519e..bfda6a66 100644
--- a/Utils.hpp
+++ b/Utils.hpp
@@ -104,45 +104,9 @@ void DumpJsonProfilingIfRequired(bool gpuProfilingEnabled,
armnn::NetworkId networkId,
const armnn::IProfiler* profiler);
-template <typename HalModel>
void ExportNetworkGraphToDotFile(const armnn::IOptimizedNetwork& optimizedNetwork,
const std::string& dumpDir,
- const HalModel& model)
-{
- // The dump directory must exist in advance.
- if (dumpDir.empty())
- {
- return;
- }
-
- // Get the memory address of the model and convert it to a hex string (of at least a '0' character).
- size_t modelAddress = uintptr_t(&model);
- std::stringstream ss;
- ss << std::uppercase << std::hex << std::setfill('0') << std::setw(1) << modelAddress;
- std::string modelAddressHexString = ss.str();
-
- // Set the name of the output .dot file.
- const std::string fileName = boost::str(boost::format("%1%/networkgraph_%2%.dot")
- % dumpDir
- % modelAddressHexString);
-
- ALOGV("Exporting the optimized network graph to file: %s", fileName.c_str());
-
- // Write the network graph to a dot file.
- std::ofstream fileStream;
- fileStream.open(fileName, std::ofstream::out | std::ofstream::trunc);
-
- if (!fileStream.good())
- {
- ALOGW("Could not open file %s for writing", fileName.c_str());
- return;
- }
-
- if (optimizedNetwork.SerializeToDot(fileStream) != armnn::Status::Success)
- {
- ALOGW("An error occurred when writing to file %s", fileName.c_str());
- }
-}
+ const armnn::NetworkId networkId);
/// Checks if a tensor info represents a dynamic tensor
bool IsDynamicTensor(const armnn::TensorInfo& outputInfo);