33 template<
typename DescriptorType>
35 const DescriptorType& desc,
37 const profiling::ProfilingGuid guid)
39 m_ProfilingDetails << std::quoted(
"Name") <<
": " << std::quoted(workloadName) <<
" ";
43 m_ProfilingDetails << std::quoted(
"GUID") <<
": " << std::quoted(std::to_string(guid));
64 m_ProfilingDetails << std::quoted(
"Convolution Method") <<
": " 73 m_ProfilingDetails << std::quoted(name) <<
" : " << std::quoted(value);
84 m_DetailsExist =
true;
91 return m_ProfilingDetails.str();
96 return m_DetailsExist;
101 void PrintInfo(
const TensorInfo&
info,
const std::string& ioString)
103 const std::vector<TensorInfo> infoVect{ info };
104 PrintInfos(infoVect, ioString);
107 void PrintInfos(
const std::vector<TensorInfo>& infos,
const std::string& ioString)
109 for (
size_t i = 0; i < infos.size(); i++ )
111 auto shape = infos[i].GetShape();
114 m_ProfilingDetails << std::quoted(ioString +
" " + std::to_string(i)) <<
": ";
120 m_ProfilingDetails << std::quoted(
"Shape") <<
": \"[";
121 for (
unsigned int dim = 0; dim < shape.GetNumDimensions(); dim++ )
123 shape.GetNumDimensions() == dim + 1 ?
124 m_ProfilingDetails << shape[dim] <<
"]\"" :
125 m_ProfilingDetails << shape[dim] <<
",";
133 m_ProfilingDetails << std::quoted(
"DataType") <<
": " 141 m_ProfilingDetails << std::quoted(
"Num Dims") <<
": " 142 << std::quoted(std::to_string(shape.GetNumDimensions()));
154 std::ostringstream m_ProfilingDetails;
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