33 template<
typename DescriptorType>
35 const DescriptorType& desc,
37 const profiling::ProfilingGuid guid)
48 m_ProfilingDetails << std::quoted(
"Name") <<
": " << std::quoted(workloadName);
52 m_ProfilingDetails << std::quoted(
"GUID") <<
": " << std::quoted(std::to_string(guid));
73 m_ProfilingDetails << std::quoted(
"Convolution Method") <<
": " 87 m_ProfilingDetails << std::quoted(name) <<
" : " << std::quoted(value);
88 m_PrintSeparator =
true;
96 m_DetailsExist =
true;
97 m_PrintSeparator =
false;
104 return m_ProfilingDetails.str();
109 return m_DetailsExist;
114 void PrintInfo(
const TensorInfo&
info,
const std::string& ioString)
116 const std::vector<TensorInfo> infoVect{ info };
117 PrintInfos(infoVect, ioString);
120 void PrintInfos(
const std::vector<TensorInfo>& infos,
const std::string& ioString)
122 for (
size_t i = 0; i < infos.size(); i++ )
124 auto shape = infos[i].GetShape();
127 m_ProfilingDetails << std::quoted(ioString +
" " + std::to_string(i)) <<
": ";
133 m_ProfilingDetails << std::quoted(
"Shape") <<
": \"[";
134 for (
unsigned int dim = 0; dim < shape.GetNumDimensions(); dim++ )
136 shape.GetNumDimensions() == dim + 1 ?
137 m_ProfilingDetails << shape[dim] <<
"]\"" :
138 m_ProfilingDetails << shape[dim] <<
",";
146 m_ProfilingDetails << std::quoted(
"DataType") <<
": " 154 m_ProfilingDetails << std::quoted(
"Num Dims") <<
": " 155 << std::quoted(std::to_string(shape.GetNumDimensions()));
167 std::ostringstream m_ProfilingDetails;
169 bool m_PrintSeparator;
Optional< std::string > m_ConvolutionMethod
ProfilingDetails class records any details associated with the operator and passes on for outputting ...
void AddDetailsToString(const std::string &workloadName, const DescriptorType &desc, const WorkloadInfo &infos, const profiling::ProfilingGuid guid)
Add to the ProfilingDetails.
ProfilingDetails()
Constructor.
Copyright (c) 2021 ARM Limited and Contributors.
constexpr const char * GetDataTypeName(DataType dataType)
std::vector< TensorInfo > m_InputTensorInfos
bool has_value() const noexcept
std::vector< TensorInfo > m_OutputTensorInfos
~ProfilingDetails() noexcept
Destructor.
std::string GetProfilingDetails() const
Get the ProfilingDetails.
Optional< TensorInfo > m_BiasTensorInfo
Contains information about TensorInfos of a layer.
std::function< void(const std::string &name, const std::string &value)> ParameterStringifyFunction
static void Serialize(ParameterStringifyFunction &, const LayerParameter &)
Optional< TensorInfo > m_WeightsTensorInfo