BugFix: Fix skipping VTS tests.
* Some tests on GpuAcc and CpuAcc P & Q were skipping because
IsConstant flag wasn't set on TensorInfo passed to validation function.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: Idd977bf621b71bb9625d8fc6620c29915de4b431
diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp
index 66e0233..ca5c99e 100644
--- a/ConversionUtils.hpp
+++ b/ConversionUtils.hpp
@@ -1244,9 +1244,10 @@
armnn::IConnectableLayer* constantLayer =
data.m_Network->AddConstantLayer(tensorPin.GetConstTensor());
armnn::IOutputSlot& outputSlot = constantLayer->GetOutputSlot(0);
- outputSlot.SetTensorInfo(tensorPin.GetConstTensor().GetInfo());
+ armnn::TensorInfo constantTensorInfo = tensorPin.GetConstTensor().GetInfo();
+ outputSlot.SetTensorInfo(constantTensorInfo);
- return LayerInputHandle(true, &outputSlot, operandTensorInfo);
+ return LayerInputHandle(true, &outputSlot, constantTensorInfo);
}
else
{
@@ -1371,9 +1372,10 @@
armnn::IConnectableLayer* constantLayer =
data.m_Network->AddConstantLayer(tensorPin.GetConstTensor());
armnn::IOutputSlot& outputSlot = constantLayer->GetOutputSlot(0);
- outputSlot.SetTensorInfo(tensorPin.GetConstTensor().GetInfo());
+ armnn::TensorInfo constantTensorInfo = tensorPin.GetConstTensor().GetInfo();
+ outputSlot.SetTensorInfo(constantTensorInfo);
- return LayerInputHandle(true, &outputSlot, operandTensorInfo);
+ return LayerInputHandle(true, &outputSlot, constantTensorInfo);
}
else
{
@@ -3036,7 +3038,6 @@
{
return Fail("%s: Could not read weights", __func__);
}
- const armnn::TensorInfo& weightsInfo = GetTensorInfoForOperand(*weightsOperand);
// If weights are constant a separate constant layer will be created to store data.
// Otherwise handle non const weights as inputs.
@@ -3052,7 +3053,6 @@
{
return Fail("%s: Could not read bias", __func__);
}
- armnn::TensorInfo biasInfo = GetTensorInfoForOperand(*biasOperand);
// If bias are constant a separate constant layer will be created to store data.
// Otherwise handle non const bias as inputs.
@@ -3062,6 +3062,7 @@
return Fail("%s: Operation has invalid inputs", __func__);
}
+ armnn::TensorInfo weightsInfo = weightsInput.GetTensorInfo();
armnn::TensorInfo reshapedInfo = inputInfo;
try
{
@@ -3073,6 +3074,7 @@
}
// Ensuring that the bias value is within 1% of the weights input (small float differences can exist)
+ armnn::TensorInfo biasInfo = biasInput.GetTensorInfo();
SanitizeBiasQuantizationScale(biasInfo, weightsInfo, reshapedInfo);
ActivationFn activationFunction;