From f80e3e7826d49fb32b6d90907ef50acc5c252826 Mon Sep 17 00:00:00 2001 From: Xusong Wang Date: Wed, 13 Mar 2019 16:24:34 -0700 Subject: [PATCH] Fix condition in mutateOperationOperandTypeSkip for conv ops. The filter tensor is not always operand 1 if there are multiple operations in the model. Test: 1.2 VTS tests with sample driver Change-Id: I8925dfd18072ae5579657e8aa13128e7d9f58324 Merged-In: I8925dfd18072ae5579657e8aa13128e7d9f58324 (cherry picked from commit 8804423ca13ab48a9c18129e9d1871498a44b8ad) --- neuralnetworks/1.2/vts/functional/ValidateModel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp index 7f4d385b96..065546d927 100644 --- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp +++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp @@ -388,8 +388,9 @@ static bool mutateOperationOperandTypeSkip(size_t operand, OperandType type, con case OperationType::GROUPED_CONV_2D: case OperationType::DEPTHWISE_CONV_2D: case OperationType::CONV_2D: { - if (operand == 1 && (type == OperandType::TENSOR_QUANT8_ASYMM || - type == OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL)) { + if (operand == operation.inputs[1] && + (type == OperandType::TENSOR_QUANT8_ASYMM || + type == OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL)) { return true; } } break;