diff options
author | Keith Davis <keith.davis@arm.com> | 2021-08-04 10:35:20 +0100 |
---|---|---|
committer | KeithARM <keith.davis@arm.com> | 2021-08-05 08:11:06 +0000 |
commit | 5a64f22101ecdda4846e9d71428633f3ccd56fb2 (patch) | |
tree | 5d5dcb617bf2c2786b37a7c64bb6c54ca5696914 /src/armnn/JsonPrinter.hpp | |
parent | 8c999dfeeca7b02a6ea1d0cdcd8c34472f6c9cce (diff) | |
download | armnn-5a64f22101ecdda4846e9d71428633f3ccd56fb2.tar.gz |
IVGCVSW-5980 Add Descriptor, TensorInfo and Convolution algorithm to JSON
* Add GUID as field to layer details and profiling events
* Add Optional GUID param to existing tests
* Improve Details macro to be inline function
* Fix some formatting
Signed-off-by: Keith Davis <keith.davis@arm.com>
Change-Id: I66f192a90a7642b3ee8e7dda0d3f428cce002581
Diffstat (limited to 'src/armnn/JsonPrinter.hpp')
-rw-r--r-- | src/armnn/JsonPrinter.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/armnn/JsonPrinter.hpp b/src/armnn/JsonPrinter.hpp index 4af1609ee3..9e8ecb48e5 100644 --- a/src/armnn/JsonPrinter.hpp +++ b/src/armnn/JsonPrinter.hpp @@ -10,6 +10,7 @@ #include <set> #include <sstream> +#include <ProfilingGuid.hpp> #include "Instrument.hpp" #include "JsonUtils.hpp" @@ -27,7 +28,10 @@ struct JsonChildObject { // Object type changes according to the JsonObjectType specified in enum JsonChildObject(const std::string& label) - : m_Label(label), m_Unit(Measurement::Unit::TIME_MS), m_Type(JsonObjectType::Event) + : m_Label(label), + m_Unit(Measurement::Unit::TIME_MS), + m_Type(JsonObjectType::Event), + m_Guid(armnn::EmptyOptional()) {} JsonChildObject(const JsonChildObject&) = default; @@ -46,6 +50,11 @@ struct JsonChildObject } } + void SetGuid(profiling::ProfilingGuid guid) + { + m_Guid = Optional<profiling::ProfilingGuid>(guid); + } + void AddChild(const JsonChildObject& childObject) { m_Children.push_back(childObject); @@ -81,6 +90,7 @@ struct JsonChildObject std::string m_Label; Measurement::Unit m_Unit; JsonObjectType m_Type; + Optional<profiling::ProfilingGuid> m_Guid; std::vector<double> m_Measurements; std::vector<std::string> m_LayerDetailsList; std::vector<JsonChildObject> m_Children; @@ -96,6 +106,7 @@ public: void PrintLabel(const std::string& label, size_t id); void PrintUnit(armnn::Measurement::Unit unit); void PrintType(armnn::JsonObjectType type); + void PrintGuid(armnn::profiling::ProfilingGuid guid); void PrintMeasurementsList(const std::vector<double>& measurementsVector); public: |