diff options
author | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2019-07-24 16:26:57 +0100 |
---|---|---|
committer | mike.kelly <mike.kelly@arm.com> | 2019-07-25 11:37:34 +0000 |
commit | 4b86213422f59feed5295d9c568639cd37c875a9 (patch) | |
tree | c1ab9fa973e5727459bddb8b8cdcd2c971bd73e5 | |
parent | ad1ab53f2898862e82f9b354853764fdcd1df97d (diff) | |
download | android-nn-driver-4b86213422f59feed5295d9c568639cd37c875a9.tar.gz |
IVGCVSW-3529 Fix UnknownCombinationsTest for Android Q NeuralNetworks 1.0 & 1.1
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Change-Id: Ifb6875c8445027f597ad13f29a0c0ae5b94e30ac
-rw-r--r-- | 1.0/HalPolicy.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/1.0/HalPolicy.cpp b/1.0/HalPolicy.cpp index 7a54e74f..8dd603a6 100644 --- a/1.0/HalPolicy.cpp +++ b/1.0/HalPolicy.cpp @@ -116,26 +116,30 @@ bool HalPolicy::ConvertAdd(const Operation& operation, const Model& model, Conve return false; } - const armnn::TensorInfo outInfo = GetTensorInfoForOperand(*outputOperand); + const armnn::TensorInfo& inputInfo0 = input0.GetTensorInfo(); + const armnn::TensorInfo& inputInfo1 = input1.GetTensorInfo(); + + const armnn::TensorInfo& outputInfo = GetTensorInfoForOperand(*outputOperand); + if (IsDynamicTensor(outputInfo)) + { + return Fail("%s: Dynamic output shapes are not supported in this HAL version", __func__); + } bool isSupported = false; FORWARD_LAYER_SUPPORT_FUNC(__func__, IsAdditionSupported, data.m_Backends, isSupported, - input0.GetTensorInfo(), - input1.GetTensorInfo(), - outInfo); + inputInfo0, + inputInfo1, + outputInfo); if (!isSupported) { return false; } armnn::IConnectableLayer* const startLayer = data.m_Network->AddAdditionLayer(); - armnn::IConnectableLayer* const endLayer = ProcessActivation(outInfo, activationFunction, startLayer, data); - - const armnn::TensorInfo& inputTensorInfo0 = input0.GetTensorInfo(); - const armnn::TensorInfo& inputTensorInfo1 = input1.GetTensorInfo(); + armnn::IConnectableLayer* const endLayer = ProcessActivation(outputInfo, activationFunction, startLayer, data); if (endLayer != nullptr) { |