MCPcopy Create free account
hub / github.com/ARM-software/armnn / ValidateTensorDataType

Function ValidateTensorDataType

src/backends/backendsCommon/WorkloadData.cpp:123–131  ·  view source on GitHub ↗

---------------------------------------------------------------

Source from the content-addressed store, hash-verified

121
122//---------------------------------------------------------------
123void ValidateTensorDataType(const TensorInfo& tensor, DataType dataType,
124 const std::string& descName, std::string const& tensorName)
125{
126 if (tensor.GetDataType() != dataType)
127 {
128 throw InvalidArgumentException(descName + ": Expected data type " + GetDataTypeName(dataType) + " but got " +
129 GetDataTypeName(tensor.GetDataType()) + " for " + tensorName + " tensor.");
130 }
131}
132
133void ValidPerAxisQuantizedDataType(const TensorInfo& tensor, const std::string& descName, const std::string& tensorName)
134{

Callers 2

ValidateMethod · 0.85

Calls 3

GetDataTypeNameFunction · 0.85
GetDataTypeMethod · 0.45

Tested by

no test coverage detected